You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/01/20 16:02:11 UTC
DO NOT REPLY [Bug 16258] New: -
getContext does not work on default context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16258>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16258
getContext does not work on default context
Summary: getContext does not work on default context
Product: Tomcat 4
Version: 4.1.12
Platform: Other
OS/Version: Linux
Status: NEW
Severity: Blocker
Priority: Other
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: huettemann@cosmocode.de
Having several contexts declared in a <host> entry, the default context
( <context name=""> .. </context> )
does not give access to other contexts declared in that host entry:
myContext.Context("/other") will always return myContext.
server.xml code snippet:
<host name="myhost.mydomain">
<Context path="" docBase="/myWebapps/test" crossContext="true" />
<Context path="other" docBase="/myWebapps/other" crossContext="true" />
</host>
/myWebapps/test/index.jsp:
my context: <%= getServletContext() %>
other context: <%= getServletContext().getContext("/other")
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>