aspose file tools*
The moose likes Tomcat and the fly likes getContext of other web-apps on the server, for Tomcat 5.5.9 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "getContext of other web-apps on the server, for Tomcat 5.5.9" Watch "getContext of other web-apps on the server, for Tomcat 5.5.9" New topic
Author

getContext of other web-apps on the server, for Tomcat 5.5.9

Nirmala Rayudu
Greenhorn

Joined: May 30, 2005
Posts: 14
Hi all,
I am using Tomcat version 5.5.9, however the issue that I am encountering might not be specific to this version.

Here it goes, In my servlet I am trying to get access to another web-app on my server(the same tomcat server instance, it is not a clustered environment) using 'getContext' method of 'ServletContext' class, the 'contextURI' parameter of the method is correct. However, the method is always returning null.

According to the documentation of 'getContext' method, the container returns null if the web-app does not exist or if the container has decided to not give access to the method becuase of security concerns.However the web-app that I am trying to get access to does not have any security constraints at all.

So,
1) Is there some setting on Tomcat that needs to be configured for this to work, assuming that Tomcat is returning null because of security concerns?

2) Does this method work in clustered Tomcat environment at all?

Thanks in advance for your relevant responses
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getContext of other web-apps on the server, for Tomcat 5.5.9
 
Similar Threads
Does tomcat 5.5.9 support Java 5.0
getContext(uri) in Tomcat
Loading a servlet using jdk1.4 in Tomcat
How can a RequestDispatcher call a servlet in another web application?
ServletContext