tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessandro Vernet" <>
Subject Context, c:import, and request URI
Date Wed, 12 Jul 2006 21:41:01 GMT
I have two war deployed on Tomcat: war1 and war2. When a request comes
from /war1/path1, a JSP in war1 runs and with the JSTL c:import [1]
imports something from war2:

<c:import context="war2" url="/url2"/>

This works because crossContext [2] is set to true in the Tomcat
configuration. Now the problem is that in war2, a
request.getRequestURI() returns /war1/url1. I expected that method to
return /war2/url2 instead. My questions are:

a) Is this is a bug or a feature?
b) What API can I use to get /war2/url2?

I see request.getAttribute("org.apache.catalina.core.DISPATCHER_REQUEST_PATH")
would do the trick with Tomcat, but that would not be portable to
other servlet containers. Any suggestion is appreciated.


Blog (XML, Web apps, Open Source):

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message