The redirect method should not add any params on the end of the url unless you
are adding them to it.  Do you hard code the url or are you passing a variable.
Try hard coding the url to the servlet like

redirect("http://www.test.com/servlet/FormHandler");

This will redirect the browser to the specified servlet and will not add any
params to the end unless you add them yourself.  I have plenty of Servlets using
this method to post to themselves and if any of the params where passed they
would not for because the else statement would not be executed but the work
perfectly.  I will use this disclaimer though.  I am using Jrun with Netscape
and IIS and it works perfectly.  I would also need information about your code,
the code that you are using to refresh, detect the parameters on the query
string, web server, servlet engine, etc. to be of further assistance

Luther






Duke Martin <[EMAIL PROTECTED]> on 05/24/99 02:37:20 PM

Please respond to "A mailing list for discussion about Sun Microsystem's Java
      Servlet API Technology." <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Luther Andal/Avnet)

Subject:  Re: interesting form question????




Hi,

I tried the send.Redirect method.  It does redirect the browser to the
original url but the parameters last set of parameters are still passed on a
refresh.  The reason I use refresh is that the data updates are not
instantaneous.  When the user submits the data, a new page is displayed but
the new data will not be displayed.  The process the new data goes through
may take up to 30 minutes.  If the user wishes to wait for the new data to
be displayed, they can simply hit refresh every few minutes to see if the
updates have been completed or they can leave the web site and return later
to see the new data displayed.  Whenever the screen is refreshed, even
though the redirect hides the params at the end of the url, they are still
re-submitted.  Any ideas?

Duke

-----Original Message-----
From: Luther Andal <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, May 24, 1999 12:24 PM
Subject: Re: interesting form question????


>I have a servlet that I use multiple times for form data and display.  I
use a
>redirect method when necessary.  I am curious as to the reason you need to
>refresh.  If the user submits the data, then save the data and display a
page
>witht he data all in the same method then there would be no refresh.  If
you
>must use a refresh a redirect to the servlet would do the same thing and
would
>alleviate your data submission problem.
>
>HttpServletResponse.sendRedirect("http://your.url.com?data=" +
>HttpServletRequest.getParameter("data") );
>
>append any data necessary to the end of the URL if necessary as the above
>example shows
>
>Luther
>
>
>
>
>
>Sam Rose <[EMAIL PROTECTED]> on 05/24/99 11:03:40 AM
>
>Please respond to "A mailing list for discussion about Sun Microsystem's
Java
>      Servlet API Technology." <[EMAIL PROTECTED]>
>
>To:   [EMAIL PROTECTED]
>cc:    (bcc: Luther Andal/Avnet)
>
>Subject:  Re: interesting form question????
>
>
>
>
>Do you use the post method?
>
>-----Original Message-----
>From:   Duke Martin [mailto:[EMAIL PROTECTED]]
>Sent:   Monday, May 24, 1999 3:12 AM
>To:     [EMAIL PROTECTED]
>Subject:        interesting form question????
>
>Hello,
>
>I have a very challenging question about forms.  I am working on an
>interactive servlet that allows users to enter data into a text field,
>submit the data.  The data is updated on the server and re-displayed on the
>SAME FORM in a non-editable text field when the screen is refreshed.  The
>problem I am having is that when the servlet is refreshed, the data that
was
>attached to the end of the url is re-submitted.  This is causing major
>problems for me.  If possible, I would like to be able to use the same
>servlet to generate the form fields and be able to process the data being
>entered and re-diplay the new data on the same form when refreshed.  Does
>anyone know how this can be done?  The servlet I currently have works great
>except for the data re-submission problem.  Any help is greatly
appreicated.
>
>Thanks
>Duke
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to