Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

does URL content change when I use .forward()  RSS feed

 
Ian Yang
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes. it is
if u want to send the client browser to a new url completly use the response.sendRedirect(..)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!