Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

redirection

 
A Babu
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below is my servlet now i want to redirect to form (view.jsp)if the data coming from the form is same as previous request.

how we can do redirection in this case.please give me suggestion with sample code of line.


cheers,
babu.
 
Bruno Boehr
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Babu,

It is not quite clear from your post exactly what you are trying to do:

> now i want to redirect to form (view.jsp)

Did you mean redirect or forward? Is your form's name view.jsp? But you are already forwarding (unconditionally) to /view.jsp in both doPost() and doGet() methods.

> if the data coming from the form is same as previous request

Let me guess: are you trying to prevent double postings? Well, if that's the case, there are a number of techniques to do that. But first, let's make sure we are on the same page here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic