wood burning stoves 2.0*
The moose likes Servlets and the fly likes redirection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "redirection" Watch "redirection" New topic
Author

redirection

A Babu
Ranch Hand

Joined: Nov 28, 2005
Posts: 114
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.


Thanks,
www.Admakr.in
Bruno Boehr
Greenhorn

Joined: Feb 15, 2006
Posts: 17
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.


<a href="http://webjavenue.com/" target="_blank" rel="nofollow">Your first website in Java: easier than you think</a>
 
GeeCON Prague 2014
 
subject: redirection