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 Holman <ch...@owl.co.uk> on 2001/11/28 12:05:10 UTC

Turbine Exceptions after a Redirect in an Action

I have been using Turbine for a couple of months now.
I've been very impressed at the speed at which applications can be put
together.

Able to get round most problems using the archived mailing lists, but this
ones stumped me.

We are writing a doc management system. We use an Action to save the
uploaded file data and then use a re-direct to get round the problem of page
refresh reloading that document as a new document.

This seems to work fine as far as the upload is concerned, but we are seeing
a TurbineException(See 'turbine.log' below) as turbine tries to decode the
redirected request. As far as I understand it, it is trying to find the
previously uploaded document(which isn't there after the redirect) due to
the http header still indicating a file upload.

After the TurbineException, the page seems to be redirected again but
renders correctly the second time. Is this to do with the redirect handling
code in the turbine.java Servlet?

Do I need to change anything in the response?(See 'Redirect Code' below)

PS: I noticed that counters have been suggested as one solution to the page
refresh issue, but a page re-direct is a quicker solution for us, if a
little dirty.

Regards,
Chris

************** Start Redirect Code ************
TemplateLink tl = new TemplateLink( data );
tl.setPage( "MySecureScreen.vm" ).addPathInfo( "identifier",
docObj.getDocID() );
data.setRedirectURI( tl.getURI() );
data.setStatusCode( 302 );
// data.setContentType("text/html") //doesnt seem to work.
************** End Redirect Code ************


************** Start turbine.log ***************************
 Exception:  org.apache.turbine.util.TurbineException: File upload failed:
the request was rejected because it's size is unknown
 Stack Trace follows:
 org.apache.turbine.util.TurbineException: the request was rejected because
it's size is unknown
 at
org.apache.turbine.services.upload.TurbineUploadService.parseRequest(Turbine
UploadService.java:123)
 at
org.apache.turbine.services.upload.TurbineUpload.parseRequest(TurbineUpload.
java:178)
 at
org.apache.turbine.util.parser.DefaultParameterParser.setRequest(DefaultPara
meterParser.java:189)
rethrown as org.apache.turbine.util.TurbineException: File upload failed:
the request was rejected because it's size is unknown
 at
org.apache.turbine.util.parser.DefaultParameterParser.setRequest(DefaultPara
meterParser.java:193)
 at
org.apache.turbine.services.rundata.DefaultTurbineRunData.getParameters(Defa
ultTurbineRunData.java:502)
 at org.apache.turbine.Turbine.doGet(Turbine.java:278)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:255)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:225)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:472)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
875)
 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
 at java.lang.Thread.run(Thread.java:484)

************** Start Turbine.log ***************************



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>