|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
File upload issueI¹m getting an error after uploading a file. Which manifests itself in my
redirect action. I¹m using a simple post redirect pattern, where the file upload action redirects to a separate fileList action. After successfully uploading the file the browser is redirected to the appropriate action, but Tomcat throws a ³ the request was rejected because its size is unknown ³ exception. If I call the offending action from the browser it works fine. Here¹s the relevant snippet from my struts.xml file: <action name="uploadFile" class="uploadFile"> <result name="input">/WEB-INF/cms/formFile.jsp</result> <result name="success" type="redirect-action"> <param name="actionName">getFile</param> <param name="namespace">/cms</param> </result> </action> Any ideas would be appreciated. Z. |
|
|
Re: File upload issueZoran Avtarovski wrote:
> I¹m getting an error after uploading a file. Which manifests itself in my > redirect action. > > I¹m using a simple post redirect pattern, where the file upload action > redirects to a separate fileList action. > > After successfully uploading the file the browser is redirected to the > appropriate action, but Tomcat throws a > ³ the request was rejected because its size is unknown ³ exception. If I > call the offending action from the browser it works fine. > > Here¹s the relevant snippet from my struts.xml file: > > <action name="uploadFile" class="uploadFile"> > <result name="input">/WEB-INF/cms/formFile.jsp</result> > <result name="success" type="redirect-action"> > <param name="actionName">getFile</param> > <param name="namespace">/cms</param> > </result> > </action> > > > Any ideas would be appreciated. Where is the exception thrown? During the first request before the redirect is sent? Or during the request resulting from the redirect? Is there any Ajax involved in handling the redirect? Assuming the exception happens in the redirected request and there's no Ajax, I'd suggest using LiveHeaders or Firebug in Firefox to examine the headers/body of the failing request to see if there's something quirky there. L. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: File upload issueArrrrgh.
Sorry I had to get that out. Thanks for the reply Laurie. You assumed right no ajax and the error ws thrown on the redirect. I took your advice and tried using firebug to get a look at the headers and to my surprise, it works. So I tried IE, no problems again. It¹s only Safari that causes me grief. The problem I have is that the client is all Mac. Has any body experienced anything similar. Clearly Safari is screwing something up in the redirect that¹s causing struts to throw an exception. Short of suggesting the client use Camino I¹m not sure where to go. Here¹s the stack trace if it¹s any help. at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionI nvocation.java:350) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:253) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Validati onInterceptor.java:150) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.do Intercept(AnnotationValidationInterceptor.java:48) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Method FilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(Con versionErrorInterceptor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Parame tersInterceptor.java:167) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Method FilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(St aticParametersInterceptor.java:105) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterce ptor.java:83) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInt erceptor.java:268) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDr ivenInterceptor.java:74) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingIn terceptor.java:115) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nIntercepto r.java:143) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareIn terceptor.java:121) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Method FilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletCon figInterceptor.java:170) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Parame tersInterceptor.java:167) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Method FilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasIntercep tor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(Ex ceptionMappingInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.sparecreative.AuthInterceptor.intercept(AuthInterceptor.java:101) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at com.sparecreative.SpareCmsInterceptor.intercept(SpareCmsInterceptor.java:75) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionI nvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack .java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati on.java:221) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.jav a:419) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java :118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java: 52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCle anUp.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:525) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http 11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) > > Zoran Avtarovski wrote: >> > I¹m getting an error after uploading a file. Which manifests itself in my >> > redirect action. >> > >> > I¹m using a simple post redirect pattern, where the file upload action >> > redirects to a separate fileList action. >> > >> > After successfully uploading the file the browser is redirected to the >> > appropriate action, but Tomcat throws a >> > ³ the request was rejected because its size is unknown ³ exception. If I >> > call the offending action from the browser it works fine. >> > >> > Here¹s the relevant snippet from my struts.xml file: >> > >> > <action name="uploadFile" class="uploadFile"> >> > <result name="input">/WEB-INF/cms/formFile.jsp</result> >> > <result name="success" type="redirect-action"> >> > <param name="actionName">getFile</param> >> > <param name="namespace">/cms</param> >> > </result> >> > </action> >> > >> > >> > Any ideas would be appreciated. > > > Where is the exception thrown? During the first request before the > redirect is sent? Or during the request resulting from the redirect? Is > there any Ajax involved in handling the redirect? Assuming the exception > happens in the redirected request and there's no Ajax, I'd suggest using > LiveHeaders or Firebug in Firefox to examine the headers/body of the > failing request to see if there's something quirky there. > > L. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > |
|
|
Re: File upload issueFurther digging found that file uploads work fine with all browsers except
Safari Mac. Safari windows is fine as is Opera, IE and the Mozilla Browsers. Does anybody know a good debugging tool for Safari? Z. |
|
|
Re: File upload issueZoran Avtarovski wrote:
> Further digging found that file uploads work fine with all browsers except > Safari Mac. Safari windows is fine as is Opera, IE and the Mozilla Browsers. > > Does anybody know a good debugging tool for Safari? Nope, but there are a number of command-line tools that can give you the same view of what's going over the wire as you get from Live Headers or Firebug independent of what browser you're using (ethereal, tcpflow, tcpdump, to name a few off the top of my head). I'd suggest using one of those (or some other 'packet sniffer') as a next step. L. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
| Free Forum Powered by Nabble | Forum Help |