tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Lunnon" <>
Subject RE: Form Data & IE vs NS
Date Thu, 23 Jan 2003 21:54:56 GMT
Don't rely on browsers to retain the previous data on a a posted form.
If you have detected an error, retrieve the data that was posted (via
request.getParamter()) and populate the form yourself.

Sample scriptlet could be

String lastFoo = "";
//error detected, haveError set to true
if (haveError == true) {
	lastFoo = request.getParameter("foo");
<input type="text" name="foo" value="<%=lastFoo%>>

This solution has worked on all browsers, regardless of version, because it
doesn't rely on the browser.

Hope this helps


-----Original Message-----
From: Kevin Wilson []
Sent: Friday, 24 January 2003 8:14 AM
To: Tomcat-User@Jakarta. Apache. Org (E-mail)
Subject: Form Data & IE vs NS

Form data not retained using back operation in IE v6.0.2800.1160 after a
form is posted but a required field was missing. Versions of IE prior to
this would allow the retention of form data.

Netscape v7.0 retains the data after an unsuccessful post and the back
button is used to return.

Tomcat 4.0.4 (using built-in HTTP connector) on SuSE Linux 8.1
MySQL database 3.x
Servlet application using JDBC.

Any ideas as to why the above version of IE doesn't keep form data in cache
would be very appreciated.



To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message