users@glassfish.java.net

Contexts and JSTL imports

From: ITVGuy2000 <hhartley_at_pobox.com>
Date: Thu, 28 Jun 2007 21:47:31 -0700 (PDT)

Prior to working with Glassfish/Netbeans I would always deploy to a context
of the application name. Something like "/application1" or "/myapp". Doing
some experimentation with the context data entry in the netbeans ide, I
realized I could have nested contexts. Something along the lines of
"/goodapps/myapp" or "/business/businessapp1" or "/personal/myapp". I found
this very useful for organizing my website into different parts, and then
deploying those parts seperately while maintaining the illusion of a
hierarchically structured set of pages. Everything worked great. Until...

In a couple of my pages I embed content from another application (context).
I do this using the JSTL import the content I need. If I have
<c:import url="/ShowXMLDefs.jsp"
context="/messingaround/MyGlossaryOneFive"/>
I get the error:
java.io.FileNotFoundException: /ShowXMLDefs.jsp

If I move the application to be at the top of the context
"/MyGlossaryOneFive" (rather than "/messingaround/MyGlossaryOneFive"), then
everything works fine.
<c:import url="/ShowXMLDefs.jsp" context="/MyGlossaryOneFive"/>
gives the result I expect.

Netbeans help screens define a context as a '/' followed by any string. I am
wondering if JSTL applies a different set of rules.

Two questions:
Is the string below a valid context?
"/is/this/a/valid/context"
Should a JSTL import with the context set to such a string work?
-- 
View this message in context: http://www.nabble.com/Contexts-and-JSTL-imports-tf3998181.html#a11355013
Sent from the java.net - glassfish users mailing list archive at Nabble.com.