tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Lunnon" <b...@mirrim.com.au>
Subject RE: Form Data & IE vs NS
Date Thu, 23 Jan 2003 21:54:56 GMT
[Suggestion]
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

Bill

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


[problem]
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.

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

[System]
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.

Thanks,

Kevin


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message