Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting reference to a Servlet Context of a Servlet that's on a different server?

 
Abhijit Ghatnekar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings.


Is it possible to use this method ServletContext getContext(String uripath) to get a reference to a Web Application Context deployed on a different server? Can the String uriPath accept an HTTP path to a servlet as opposed to an absolute path ?

Regds,
Abhijit.
 
Tim Moores
Bartender
Posts: 2895
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No
 
Ram Narayan.M
Ranch Hand
Posts: 247
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This can be used to get ServletContext of other web application in the same Servlet Container but not the different ServletContext in different server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic