You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Chris Joelly <ch...@unycom.com> on 2004/01/14 12:08:55 UTC

Handling of too big fileupload's -> exception?

Hi!

i set the fileupload service to limit fileuploads to 20mb.
how can i handle exceptions properly if somebody tries to upload a
bigger file than the configured limit?

thx, Chris

-- 
mit freundlichen Grüßen / with kind regards
 
Ing. Christian Jölly @ Solutions
unycom  Information Technology Services GmbH
A-8042 Graz | Schmiedlstraße 1 / III

Tel: ++43 (0)316 / 818 828 - 30
Fax: ++43 (0)316 / 818 828 - 38
chris.joelly@unycom.com
http://www.unycom.com

Hey, schon IIS 5.0 ist ein Problem!  Der Kunde weiß, daß er mit dem
Setup in 4 Monaten spätenstens

* gehackt
* trojaned
* oder total verwirrt

ist?
		-- Ralf Hildebrandt

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Handling of too big fileupload's -> exception?

Posted by Akmal Sarhan <as...@byteaction.de>.
there is no way to do that unless you patch the
setRequest method of DefaultParameterParser.class where the exception is
caught and simply logged :-(

regards
Akmal


----- Original Message ----- 
From: "Chris Joelly" <ch...@unycom.com>
To: <tu...@jakarta.apache.org>
Sent: Wednesday, January 14, 2004 12:08 PM
Subject: Handling of too big fileupload's -> exception?


> Hi!
>
> i set the fileupload service to limit fileuploads to 20mb.
> how can i handle exceptions properly if somebody tries to upload a
> bigger file than the configured limit?
>
> thx, Chris
>
> -- 
> mit freundlichen Grüßen / with kind regards
>
> Ing. Christian Jölly @ Solutions
> unycom  Information Technology Services GmbH
> A-8042 Graz | Schmiedlstraße 1 / III
>
> Tel: ++43 (0)316 / 818 828 - 30
> Fax: ++43 (0)316 / 818 828 - 38
> chris.joelly@unycom.com
> http://www.unycom.com
>
> Hey, schon IIS 5.0 ist ein Problem!  Der Kunde weiß, daß er mit dem
> Setup in 4 Monaten spätenstens
>
> * gehackt
> * trojaned
> * oder total verwirrt
>
> ist?
> -- Ralf Hildebrandt
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Handling of too big fileupload's -> exception?

Posted by Chris Joelly <ch...@unycom.com>.
Hello!

i got the following exception when uploading a file with turbine if
the file is larger then spezifgied in turbine.properties.

how can i handle this exception? i want to display a error message to the user at least ...

thx, Chris

[Fri Jan 16 13:16:51 CET 2004] -- ERROR -- 
	Exception:  org.apache.turbine.util.TurbineException: File upload failed: the request was rejected because it's size exceeds allowed range
	Stack Trace follows:
	org.apache.turbine.util.TurbineException: the request was rejected because it's size exceeds allowed range
	at org.apache.turbine.services.upload.TurbineUploadService.parseRequest(TurbineUploadService.java:121)
	at org.apache.turbine.services.upload.TurbineUpload.parseRequest(TurbineUpload.java:174)
	at org.apache.turbine.util.parser.DefaultParameterParser.setRequest(DefaultParameterParser.java:188)
rethrown as org.apache.turbine.util.TurbineException: File upload failed: the request was rejected because it's size exceeds allowed range
	at org.apache.turbine.util.parser.DefaultParameterParser.setRequest(DefaultParameterParser.java:192)
	at org.apache.turbine.services.rundata.DefaultTurbineRunData.getParameters(DefaultTurbineRunData.java:493)
	at org.apache.turbine.Turbine.doGet(Turbine.java:472)
	at org.apache.turbine.Turbine.doPost(Turbine.java:658)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
	at java.lang.Thread.run(Thread.java:536)



-- 
mit freundlichen Grüßen / with kind regards
 
Ing. Christian Jölly @ Solutions
unycom  Information Technology Services GmbH
A-8042 Graz | Schmiedlstraße 1 / III

Tel: ++43 (0)316 / 818 828 - 30
Fax: ++43 (0)316 / 818 828 - 38
chris.joelly@unycom.com
http://www.unycom.com

Diese Spezies träumt seit mindestens 2000 Jahren von einer
Gesellschaftsordnung in der alle Menschen zufrieden leben
können. Bisher hat sie aber nur Gesetzeswerke produziert, die immer
wieder Ungerechtigkeit hervorriefen. Die Gesetze, sprich die
gesellschaftlichen Normen, werden von UNS gemacht. 
		-- Günter Cave

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org