tomcat-users mailing list archives

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

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

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

Summary:
  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)

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

  <body>
  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" >
  </form>

  </body>
  </html>
  ---------------------------

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

  <body>
  Results:
  <%
    String command = request.getParameter("command");
    String name=request.getParameter("name");
  %>
  Command is <%= command %><br>
  Name is: <%= name %><br>
  </body>
  </html>
  ----------------------------

  server.xml defines context "localhost" and sets up ajp13
  httpd.conf jkmount's jsps to ajp13
  worker.properties 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 
    "application/x-www-form-urlencoded"

  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:
   
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg10905.html
    )
    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
NuRelm
brf@nurelm.com

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message