aspose file tools*
The moose likes Tomcat and the fly likes Access resource in one application from another in same tomcat instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Access resource in one application from another in same tomcat instance" Watch "Access resource in one application from another in same tomcat instance" New topic
Author

Access resource in one application from another in same tomcat instance

Ashish R Garg
Greenhorn

Joined: Jan 15, 2009
Posts: 8

Can I access one resource in an application deployed on tomcat 6 from another Java file in separate application deployed on same Tomcat instance?
If yes, how?


Never settle for less. Never Quit.
K. Gil
Ranch Hand

Joined: Apr 29, 2011
Posts: 75

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
Context Attributes - crossContext
"Set to true if you want calls within this application to ServletContext.getContext() to successfully return a request dispatcher for other web applications running on this virtual host. Set to false (the default) in security conscious environments, to make getContext() always return null."

alternative would be to use something like JMX, so that you can do "calls" and fetch/put/exchange some data/information between apps.

Java / Tomcat Hosting at http://goJava.net
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access resource in one application from another in same tomcat instance
 
Similar Threads
Urgently reqd.. Security of web applications
Securing web appln
Servlet and general architecture question
How to set the java framework at the application level
Can sendRedirect method hit a different server instance?