users@glassfish.java.net

Re: Servlet not getting POST data?

From: <glassfish_at_javadesktop.org>
Date: Tue, 20 Mar 2007 02:50:39 PST

Hi Jan,

The problem occurs randomly. Sometimes it happens, sometimes it doesn't. It doesn't seem to be tied to any specific form values entered. In one JSP, I have the form, i.e. (I left out the validate() javascript):

[code]
<form name=form1 method=POST action="./support/process-general.jsp" onSubmit='javascript:return validate()'>
<input type="textbox" name="value1">
<input type="hidden" name="section" value="step2">
<input type="submit">
</form>
[/code]

In the other JSP, I do this:
[code]
String section = request.getParameter("section");
if(section!=null && section.equals("step2")){
// blablabla
}else{
System.err.println("Error - no form values received");
}
[/code]

At random, the section variable (and therefore, I assume, the entire form data) is not received and I get my System.err message. This is the standard form. I don't see any exceptions or errors in server.log. Is there another place where I can monitor this problem?

dailysun
[Message sent by forum member 'dailysun' (dailysun)]

http://forums.java.net/jive/thread.jspa?messageID=208886