Hi Ion,

    Sorry for not having explained well. Just tell you that I already do what
you say, so I'm sure I'm using the post method, and Tomcat or the navigator has
a maximun lenght even for its post URI... Do you know if there is any way of
changing the maximum lenght and which is that maximun length for post URI's?
What I exactly do is:

<FORM NAME="form1" ACTION="javascript:myFunc()" METHOD="post">
        <INPUT TYPE="hidden" NAME="myQuery" VALUE="myquery">
        ...
</FORM>

and in my javascript file:

function myFunc() {
    myWin =
window.open("../servlet/myServlet?query="+document.form1.myQuery.value);
}

(That is because I want the result page to be a new page, not the same page...)



Thanks.

    Sonia.




=?us-ascii?Q?Ion_Larranaga?= escribió:

> In your example you are not using the POST method.
>
> Any time you see a URL with the ? character in it, it means you are sending
> data with the GET method. The GET method allows parameters, but has a size
> limitation, as you have seen.
>
> If you want to make sure you are using the POST method you have to use a
> form, something like:
>
> <FORM NAME="form1" ACTION="../servlet/myServlet" METHOD="post">
>         <INPUT TYPE="hidden" NAME="query" VALUE="myquery">
> </FORM>
>
> When you want to send the data you have to use javascript to change the
> value of the hidden field to what you want and submit the form. This way you
> can be sure that the data will be sent using POST.
>
> Hope it helps,
>
>    Ion
>
> -----Mensaje original-----
> De: Sonia Galilea Varea [mailto:[EMAIL PROTECTED]]
> Enviado el: jueves, 15 de noviembre de 2001 10:57
> Para: Tomcat Users List
> Asunto: HTTP POST request: maximum allowed data?
>
> Hi all,
>
> I have to tranfer data from a html form to a servlet, by using the HTTP POST
> request.
>
> I do it by javascript:
>
> myWin = window.open("../servlet/myServlet?query="+myQuery);
>
> I wonder what's the maximum allowed data to send with a POST command. And
> the
> GET?
> I had a look in the RFC but didn't find any size limitation. But there is
> one,
> because I get an exception
> if my URL is too large...
>
> Is there a way to setup the web server (I'm currently using Tomcat
> standalone 3.2.1) to accept more data?
>
> Thanks for any info.
>
>     Sonia.
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to