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

redirection  RSS feed

 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!