• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access resource in one application from another in same tomcat instance

 
Ashish R Garg
Greenhorn
Posts: 8
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
K. Gil
Ranch Hand
Posts: 75
Java Linux Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic