Joe DeVries 
Lead Software Application Developer 
Division of Finance - IT Services
Texas A&M University 
Phone: 845-8297 Mail Stop: 1182 
Email: [EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Martin Cooper
Sent: Wednesday, November 28, 2007 3:49 PM
To: Tag Libraries Users List
Subject: Re: c:url and context path completion

On Nov 28, 2007 1:43 PM, Trenton Adams <[EMAIL PROTECTED]> wrote:

> Martin Cooper wrote:
> > On Nov 28, 2007 1:01 PM, Trenton Adams <[EMAIL PROTECTED]>
wrote:
> >
> >
> >> Kris Schneider wrote:
> >>
> >>> On 11/28/07, Trenton Adams <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>> Kris Schneider wrote:
> >>>>
> >>>>
> >>>>> On 11/28/07, Trenton Adams <[EMAIL PROTECTED]> wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>> I was sure that I had read somewhere that "<c:url
> >>>>>> value="/images/pluslittle.gif"/>" usage would automatically
cause
> the
> >>>>>> context path to be entered into the output of "c:url".  Is that
not
> >>>>>> correct?  Because it's not working!
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> From the JSTL 1.1 Spec for <c:url>:
> >>>>>
> >>>>> As a consequence, an implementation must prepend the context
path to
> a
> >>>>> URL that starts with a slash (e.g. "/page2.jsp") so that such
URLs
> can
> >>>>> be properly interpreted by a client browser.
> >>>>>
> >>>>> So, yes, the context should be prepended. What output are you
> actually
> >>>>>
> >> seeing?
> >>
> >>>>>
> >>>>>
> >>>> I'm seeing it produce "/images/pluslittle.gif", and it completely
> >>>> ignores the context path.  I'm using tomcat 6 and java 1.5
> >>>>
> >>>>
> >>> This wouldn't happen to be a JSP sitting in webapps/ROOT, would
it?
> >>> Just checking...
> >>>
> >>>
> >>>
> >> No, it's sitting in
"webapps/appname/WEB-INF/jsp/otherdir/somejsp.jsp"
> >>
> >
> >
> > Well, that's very likely the cause of what you're seeing. Anything
under
> > WEB-INF is not permitted to be accessed directly (i.e. from outside
the
> web
> > app itself), so the context is irrelevant for such files, since it
could
> > never be used to access them.
> >
> >
> I don't think that is the problem, I do it all the time.  My servlet
> accesses the JSP's through dispatching.  The browser has no need to
> access my JSP files directly, which is why I put them in WEB-INF.
> Perhaps putting everything in WEB-INF is causing the problem, but
> definitely not for the reason you described.  But, I will be looking
> into this to see if putting my JSPs in WEB-INF is causing the problem
or
> not.  But, I'm pretty darn sure this worked before.  But, then again,
> maybe it's because I never used anything other than the default
context,
> so I never noticed before?!?!?!


Yeah, sorry, I realised a few seconds after I hit Send that I was being
a
dope. I'm not sure if this demonstrates that taglibs knowledge "leaks"
when
you don't use them for a while, or that I need to break for lunch... ;-)

--
Martin Cooper



> > --
> > Martin Cooper
> >
> >
> >
> >>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail:
[EMAIL PROTECTED]
> >>
> >>
> >>
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to