• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Fetching the cotext of the different application hosted within the same tomcat

 
Sudhakar Duraiswamy
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I trying to get hold of the ServletContext of another application deployed within the same tomcat .

api points that i should be able to by calling public ServletContext getContext(java.lang.String uripath) on current servlet context

so when i try printing this



Output:
Different Context null


I dont seem to understand y?


Other details:
container : tomcat 5.5
deployed as Dynamic Web project
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2166
57
Android Chrome Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont seem to understand y?

See this previous thread and search for crosscontext thread

Regards,
Frits
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sudhakar Duraiswamy wrote:


Output:
Different Context null


Did you check the API of the ServletContext? There,
In a security conscious environment, the servlet container may return null for a given URL.


So, it may be the reason!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic