tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Herrick <r...@violetshivers.com>
Subject Calling within and across webapp contexts
Date Wed, 28 Feb 2001 18:29:20 GMT
I asked the question earlier and never received a response, so I'll try again!

We have a JSP app that's currently running in JRun 2.3.3 (JSP 1.0 
compliant).  When we refer to different directories within the app, we 
always preface with the "context" name, or really the top-level virtual 
directory.  So if you want a common file, you do this:

<jsp:forward page = "/CpsAdmin/Common/loginForm.jsp" />

The problem is that, testing under Tomcat, this doesn't work.  It tries to 
prepend the context name onto the path, so that this becomes 
/CpsAdmin/CpsAdmin/Common/loginForm.jsp.

My questions are:

* Is this part of the JSP 1.1 spec?  It flies in the face of conventional 
usage of path names across the board, i.e. anything that starts with '/' 
means you go to the top-level of the server hierarchy.  What's the rationale?

* Is there anyway to change this and make Tomcat do the "right" thing, i.e. 
see '/' as the server root?

* Does this also mean that you can't call across contexts?  That is, we 
produce our tools as separate items, since customers may install some 
pieces and not others.  But if two tools are installed, they can work 
together and then would need to call across contexts.  I can think of no 
good reason why this shouldn't be permitted, but based on this behavior, it 
does look as if it would.

Thanks in advance for any feedback!  Getting this worked out will help save 
me a TON of time porting over our apps!

Rick Herrick, AKA rick@violetshivers.com
In zero gravity, nothing is amusing.
PGP: http://www.rickherrick.com/pgpkey


Mime
View raw message