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

Reply via email to