Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP(forward & sendredirect)

 
ram kumar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
could any please explain me about the <jsp:foward> tag and <% response.sendRedirect %>.what's the difference between the two and at what condition should i use <jsp:forward> and sendRedirect ???
awaiting for your reply -- urgent
ram
 
Brian Nice
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi-
<jsp:forward> forwards the request on to another JSP, servlet, or static resource. This means the new object is able to access the parameters or whatever is attached to the request object. You can even add new paramters within the forward tags.
sendredirect actually causes a new HTTP request to happen, thus you lose everything from the initial request.
HTH
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic