You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by tw...@mail.inf.tu-dresden.de on 2007/09/24 15:25:55 UTC

issue when redirect/forward on not - parsed form/multipart request

Hello,

Hopefully this is the right place for my problem.

I wrote a servlet (running on Apache Tomcat 5.5) using Commons FileUpload
and it works good except for the following problem:

If a user wants to upload a file larger then sizeMax, a
SizeLimitExceededException is thrown while parsing the request and I want
to redirect the user to another webpage displaying a warning/error. If the
users session expired the request is ignored (not parsed) and the user is
redirected to some page telling him about it.

If I try this using Tomcat 5.5 alone (localhost:8080/...) it works well,
but if I use it together with Ms IIS / isapi redirector (jk-1.2.25), then
those warnings are not shown, instead a (hope this is the right
translation) "Connection aborted, Connection to server was reset while
loading the page" is shown in the browser. No errors found in the logs of
Tomcat/Redirector. If the request is fully parsed (file upload ok), then
all goes OK.

Is there something that has to be done (sort of "cancelling" the request)?


Thanks in advance for your efforts! (..and please excuse my english ;-) )


Thomas


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: issue when redirect/forward on not - parsed form/multipart request

Posted by Rainer Jung <ra...@kippdata.de>.
Hi Thomas,

tw796021@mail.inf.tu-dresden.de wrote:
> I wrote a servlet (running on Apache Tomcat 5.5) using Commons FileUpload
> and it works good except for the following problem:
> 
> If a user wants to upload a file larger then sizeMax, a
> SizeLimitExceededException is thrown while parsing the request and I want
> to redirect the user to another webpage displaying a warning/error. If the
> users session expired the request is ignored (not parsed) and the user is
> redirected to some page telling him about it.

As I understand you, you can easily reproduce the  behaviour without 
actually uploading huge files, because the redirect should happen before 
the actual upload starts?

If so, you can increase the redirector log level to "debug" or even 
"trace", because then we can see, if and in which form your redirect 
comes back and maybe also, what happens to it.

> Is there something that has to be done (sort of "cancelling" the request)?

I'm not sure, let's look at the log. I expect, you return a 30x, using a 
real http redirect?

Just to make sure, you should also post your workers.properties.

> Thomas

Regards,

Rainer

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org