tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: question about Tomcat5.5 getServletContext().getContext(String url);
Date Wed, 23 Dec 2009 16:15:54 GMT
Hash: SHA1


On 12/22/2009 4:35 AM, André Warnier wrote:
> In other words, [that code] is trying to get the context of a webapp which should
> be located at webapps/File.
> If you do not have such a webapp, then that is the reason for the
> message above.

Tomcat requires a webapp to be configured as "cross-context" enabled in
order to grab the ServletContext from another webapp. If this webapp
isn't cross-context-enabled, then you'll get 'null' whether that webapp
exists or not.

See for more
information. Specifically, search for "crossContext" within that page.

> Why it is doing that however, and whether it is a problem, is something
> you will need to ask from the author of the application.


It's not often that you need to grab another webapp's ServletContext,
unless you want to to a server-side forward across webapps. Unless you
have a particular requirement to do this, I would recommend that the OP
de-couple the two (or more?) webapps by using a client-side redirect
instead of a server-side forward.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message