This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Getting reference to a Servlet Context of a Servlet that's on a different server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Getting reference to a Servlet Context of a Servlet that Watch "Getting reference to a Servlet Context of a Servlet that New topic
Author

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

Abhijit Ghatnekar
Greenhorn

Joined: Nov 10, 2007
Posts: 19
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
Rancher

Joined: Sep 21, 2011
Posts: 2408
No
Ram Narayan.M
Ranch Hand

Joined: Jul 11, 2010
Posts: 247

This can be used to get ServletContext of other web application in the same Servlet Container but not the different ServletContext in different server.


SCJP 6 [SCJP - Old is Gold]
 
 
subject: Getting reference to a Servlet Context of a Servlet that's on a different server?
 
Similar Threads
RequestDispatcher in servletcontext
communicating between two web application
ServletContext's getContext() method
ServletContext
How can a RequestDispatcher call a servlet in another web application?