Results 1 to 2 of 2
Thread: Servlet calling JSP page
- 01-15-2008, 03:38 PM #1
Member
- Join Date
- Jan 2008
- Posts
- 17
- Rep Power
- 0
- 01-15-2008, 04:00 PM #2
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
You can either use the HttpServletResponse.sendRedirect() method or using HttpServletRequest.forward() method. This two method have a different behavior. The sendRedirect() will cause a browser to initiate a new request to the server, this means you have to keep your data so it will arrive on the next target page, for example you can keep the data in session scope.
While the forward method will just forward the request to another target without asking the browser to initiate a new request, or the browser didn't know that you request is processed in another page.Website: Learn Java by Examples
Similar Threads
-
how to load a servlet on index.jsp page...
By sujithc34 in forum Java ServletReplies: 1Last Post: 01-19-2008, 12:28 AM -
MIDLet calling Servlet
By ravian in forum Java ServletReplies: 1Last Post: 12-06-2007, 12:48 PM -
Calling a Jython script from a Java Servlet returns incomplete output
By bthakur in forum Java ServletReplies: 0Last Post: 11-13-2007, 12:41 PM -
javax.servlet.ServletException: Wrapper cannot find servlet class util.t2
By osval in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 03:47 PM -
Help with Calling a method
By Albert in forum New To JavaReplies: 3Last Post: 07-10-2007, 03:27 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks