Redirect question

Mike Silvers <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Organization Hainey Business Systems
Message-ID <[email protected]>
Hopefully this is something simple :)

I have a jsp that uses a controller servlet to do the processing.  From the servlet, the response is redirected according to the processing option.  After the redirect, the URL displayed on the browser remains as the servlet URL.  I need to have this changed to the proper page URL.

I am doing a redirect -- the code involved in the redirect is as follows:

(getServletContext().getRequestDispatcher(NEXT_PAGE)).forward(request, response);

Before doing the redirect, I set some header values as follows:

response.setHeader("Location", response.encodeURL(NEXT_PAGE));
response.setHeader("Content-Location", response.encodeRedirectURL(NEXT_PAGE));

Thanks!

Mike

=======================================
Mike Silvers
Senior Programmer/Analyst
IBM Certified Expert
Hainey Business Systems
Main Office:  (717) 718-9601 ext 237
Branch Office:  (410) 397-8739
http://www.hbs-inc.com
=======================================
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.