Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

does URL content change when I use .forward()

 
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(..)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic