Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

return control from servlet to calling jsp

Status
Not open for further replies.

lowbk

Technical User
Nov 26, 2001
162
SG
hi, i have a jsp that activates a servlet and after processing, the servlet should display a message, wait for a while then return the control to the jsp.

JSP1->servlet1->JSP1
the servlet can be activated by other jsp too
JSP2->servlet1->JSP2

getServletContext().getRequestDispatcher("/jsp1.jsp").forward(request, response)
is definitely not correct, since the calling JSP isn't always the same.

'm stuck, how to make the servlet display a message and then return to the calling jsp after waiting for some 5 seconds?

any kind soul pls advise, or is there any code i can reference?
 
IN general, you are using things backwards according to good practices. You should really use an MVC architecture when developing web apps with J2EE. Use servlets as the controllers and JSP's as the view.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top