dcsimg
When I redirect from a servlet to a jsp using forward the url in the browser does'nt change
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Abdelhamid_BETTACHE
Posted On:   Monday, May 14, 2001 06:42 AM

When I redirect from a servlet to a jsp using forward (RequestDispatcher) the url in the browser does'nt change , When I refresh , the action restart from the servlet , not from only the jsp page .
Another thing, when I return from the servlet to the jsp that submitted the action , the url adress of the action field in the form will not work as the context change.

Re: When I redirect from a servlet to a jsp using forward the url in the browser does'nt change

Posted By:   Anonymous  
Posted On:   Monday, May 14, 2001 05:39 PM

Ok. One answer at a time.

1 - Yes the url in the browser doesn't change because the client it's not involved in this operation. The RequestDispatcher.forward() it's passing the control to a new servlet/jsp directly.

2 - If you refresh, you are regenerating the same request that you have generated before. Again, the browser doesn't know that you have done an internal forward. So, the requested page is the servlet and not the jsp.

3 - I cannot understand the problem. Can you please explain it again?

Regards.

Re: When I redirect from a servlet to a jsp using forward the url in the browser does'nt change

Posted By:   Mittal_Bhiogade  
Posted On:   Monday, May 14, 2001 07:17 AM

Answer to the first part as the ur in ServletContext u will never see the path where Jsp resides as the Servlet does the Redirection
ur second Part of the Question is not Clear..

pls mail at mittal.bhiogade@patni.com
About | Sitemap | Contact