A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Communication between servlets of two different applications in Tomcat
Joined: Dec 23, 2008
May 04, 2009 10:59:59
I had initially posted this doubt in
's forum. I learned this is the more appropriate place for the question.
I have a question regarding invoking a resource from other application in
Consider, there are 2 web applications viz., WebApplication1 and WebApplication2.
WebApplication1 has Servlet1 and WebApplication2 has Servlet2.
How can we forward the request to Servlet2 (in WebApplication2) from Servlet1 (in WebApplication1).
In Servlet1 we can write,
RequestDispatcher rd=request.getRequestDispatcher("..."); rd.forward(request,response);
I think we have to play with
. Somehow we have to get the
of WebApplication2 in WebApplication1.
in the web application have reference to the Servlet Context.
Does Tomcat maintain "something" as a reference to all the Servlet Contexts?
Any ideas are welcome.
Thanks for your time and consideration.
Author and ninkuma
Joined: Jan 10, 2002
May 04, 2009 11:02:11
Please don't post the same question in two places. Ask a staffer to move the original.
I have taken care of that for you.
It would have been fine had you pointed out that you are looking for cross-context dispatching, but you just re-posted the same general question.
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: Communication between servlets of two different applications in Tomcat
requestdispatch - servlet to servlet in iplanet( anyone plzzzzzzz!!!!)
Don't understand defining roles in HFJS book
Servlets Scenario Question
HFSJ Chapter 6 - Mock exam Question 7
Communication between servlets of two different applications
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014