File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes does URL content change when I use .forward() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "does URL content change when I use .forward()" Watch "does URL content change when I use .forward()" New topic
Author

does URL content change when I use .forward()

Ian Yang
Ranch Hand

Joined: Nov 27, 2001
Posts: 44
Hello,
I found that when I do a forward(req, res) from a servlet to a jsp. The content of the page changes to the jsp's content, but the URL stays the same as servlet's URL. Is it suppose to be the case ?
Thank lot,
Ian
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
yes. it is
if u want to send the client browser to a new url completly use the response.sendRedirect(..)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: does URL content change when I use .forward()