tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Byron Frank <>
Subject Problem with FORM POST data on Windows
Date Wed, 06 Feb 2002 20:34:42 GMT

I'm having a problem reading forms data using POST through Apache.

  Apache 1.3.23 / Tomcat 3.2.2 / mod_jk / Win 2000
    mod_jk setup to use ajp13

  A form with method="POST" is action'ed to a JSP.
  The forms data should be in the request object.
  When I hit the jsp directly through tomcat (port 8080),
    the data are present.
  When I hit the jsp through apache, the request object
    does not contain the forms data.
  (All other Apache / Tomcat interactions seems to work fine.)

  This situation happens under Windows 2000, *not* under
    an identical setup under Linux (RH 7.1)

  -- File form.jsp ----------
  <head><title>Check Page</title></head>

  All right, enter your name:

  <form action="process_form.jsp" method="post">
    <input type="text" name="name">
    <input type="submit" name="Click me">
    <input type="hidden" name="command" value="punt" >


  -- File process_form.jsp --
  <head><title>Check Data</title></head>

    String command = request.getParameter("command");
    String name=request.getParameter("name");
  Command is <%= command %><br>
  Name is: <%= name %><br>

  server.xml defines context "localhost" and sets up ajp13
  httpd.conf jkmount's jsps to ajp13 set to point to the correct locations

  Hitting //localhost:8080/form.jsp, entering something which
    then displays //localhost:8080/process_form.jsp correctly
    displays the value of the input field ("name") and the
    hidden field ("command").

  Hitting //localhost/form.jsp, entering something and then
    on to //localhost/process_form.jsp displays nulls for
    "name" and "command".

  In both cases, the "content type" is reported as 

  As might be expected, if I change the method to "get" instead
    of put, things work fine.  But that is not practical for
    my larger application.

  Almost a year ago, somebody else reported the same problem
    (see here:
    but I did not see any solutions in the archives.

  Any ideas?  I'm most confused by the fact that it works on Linux
  and not on Windows.

Byron Frank

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message