tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject How to call JSP page with POST method from HTML form?
Date Tue, 05 Sep 2000 11:01:57 GMT
I have Tomcat 3.1 (from Release Builds).
I work with it under Windows 95.
My Web browser is Microsoft Internet Explorer 5 (MSIE 5).

I have problems with POSTing data [by method="post"] from HTML forms (inside my q.html)
to JSP page (my q.jsp). GETting [by method="get"] works correctly.

My HTML page (q.html)

<FORM action="q.jsp" method="get">
<INPUT type="text" name="q_par" value="get">
<INPUT type="submit">

<FORM action="q.jsp" method="post">
<INPUT type="text" name="q_par" value="post">
<INPUT type="submit">

My JSP page (q.jsp)

<HEAD><TITLE>Problems with POST</TITLE></HEAD>
<%= request.getParameter("q_par") %>

Describe of a my problem

1) I press button for SUBMIT of the first HTML form (that is for GET).
The q.jsp displays the correct text (that is "get").
2) I return to q.html.
3) I press button for SUBMIT of the second HTML form (that is for POST).
MSIE 5 works and works, but does not display q.jsp.
Instead of it MSIE 5 (after some 5 minutes) finishes with timeout error.


1) I found that when I remove the line <INPUT type="text" name="q_par" value="post">
    from the second HTML form, q.jsp will display (but without that q_par parameter, of course).

2) Netscape works correctly for both two HTML forms!

3) MSIE 5 sends HTTP header "Content-Length" as the one before last (that is before parameter

4) Netscape sends HTTP header "Content-Length" as last one HTTP header.

5) The Specification at RFC 2068 does not speak about the order of HTTP headers.

My conclusion: Tomcat 3.1 has a bug. Is it correct conclusion?

Can anybody help what to do, if I have to work with MSIE 5 (not with Netscape)?

        Mirek Subrt

View raw message