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 A Question in Requesting Context ? 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 "A Question in Requesting Context ?" Watch "A Question in Requesting Context ?" New topic
Author

A Question in Requesting Context ?

Vasantha Prabha
Ranch Hand

Joined: Oct 02, 2003
Posts: 108
Hi,

I have two on context in the tomcat 4.1 server.
When I run the application in first context.
(e.g) login validation should be done in the application in the other
context and the application in the Second context should be loaded
How can in do this.

Regards,
Vasanth


Regards,Vasantha<p>Great minds discuss ideas. Average minds discuss events. Small minds discuss people.
Tybon Wu
Ranch Hand

Joined: Jun 18, 2002
Posts: 84
You can get the ServletContext of another web application by calling

getServletContext().getContext(uripath)

where uripath is the context path of the other web application. You can subsequently call getRequestDispatcher(path) on this context and forward the request to the appropriate resource on the second context.

Is this what you are trying to do?


SCJP2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A Question in Requesting Context ?
 
Similar Threads
doPost() is not called in servlet logic
passing session values between two web application
RUP Versus RAD!!
unable to run restful webserive
Servlet Context parameters