• Post Reply Bookmark Topic Watch Topic
  • New Topic

communication between two different context

 
parag dharmadhikari
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
If I have got servlet running in inner context.But I want to transfer the control from inner servlet to outer jsp.
I know the way to transfer the control from servlet to jsp but can anybody please tell me how can one pass control from inner context to outer context.
We are using tomact as web server.
Regards
Parag
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "context" do you want to transfer control from one webapp to another webapp? Or are they both under the same webapp?
 
Sandep Chaturvedi
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are in same context, you should be able to pass it using RequestDispatcher.
 
Ruilin Yang
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With JRun, I do communicate between different Web Apps (under the same JRun Server) using JSP/Servlet. I believe some other Web Server can do the same thing.
[ August 29, 2002: Message edited by: Ruilin Yang ]
 
Shawn Bayern
Author
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general, the Servlet standard supports this, but a container may decide not to allow it. In JSTL, you can use the <c:import> tag with a 'context' parameter to name an alternate context. For instance:
<c:import context="/other" url="/index.jsp" />
This works with <c:redirect> and <c:url> as well, depending on whether you're trying to include, forward, or display a link for a page in a different context.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!