commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashok Madhavan <ashsud2...@yahoo.com>
Subject Re: Upload Problem
Date Wed, 11 Jun 2003 04:11:21 GMT
hi Rob,
Thanks for the info. I am testing that now.
I got a another question.
I have a typical upload/download functionality. For
the upload i use the commons-fileupload and for the
download i use the ServletOutpurStream like this.

	ServletOutputStream stream =
response.getOutputStream();
	int sent = 0;
         stream.write(data, sent, data.length - sent);
	stream.flush();
	stream.close();
        return null;

After a few times (some times just one ) uploading and
downloading the browser seems to get slower and if i
click any link on the site, the request does not go to
the server at all. But if i click any link the second
time, it goes to the server.

Any idea why this weird error is happening?

I am using the weblogic 7.0 and working in Struts 1.1
RC1.

regards
Ashok

	
--- Rob Leland <rleland@apache.org> wrote:
> Ashok Madhavan wrote:
> 
> Do you have a <controller > statement in your
> struts-config.xml and if 
> so are you setting
> the upload file size limit ? For example:
> 
>   <controller maxFileSize="2M" />
> 
> There are other parameters that can be set also.
> Another problem you may 
> run into is
> that if you are uploading really large files I have
> done 650MB and 1 GB 
> files with fileupload,
> and using tomcat there is a setting in the
> server.xml tomcat file that 
> prevents the session from timing out
> during file uploads.
> 
> -Rob
> 
> 
> >Hi all,
> >I am using the Struts version RC-1. 
> >
> >I am using the Struts upload and i am able to load
> >files upto about 230KB size. WHen the size of the
> >uploaded file goes more than 300KB, i am getting
> the
> >following exception.
> ><Jun 10, 2003 7:01:03 PM PDT> <Error> <HTTP>
> <101017>
>
><[ServletContext(id=5921274,name=prototype,context-path=/prototype)]
> >Root cause of ServletException
> >java.lang.NullPointerException
> >        at
>
>org.apache.commons.fileupload.DeferredFileOutputStream.thresholdReached(DeferredFileOutputStream.java:163)
> >        at
>
>org.apache.commons.fileupload.ThresholdingOutputStream.checkThreshold(ThresholdingOutputStream.java:260)
> >        at
>
>org.apache.commons.fileupload.ThresholdingOutputStream.write(ThresholdingOutputStream.java:167)
> >        at
>
>org.apache.commons.fileupload.MultipartStream.readBodyData(MultipartStream.java:513)
> >        at
>
>org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:360)
> >        at
>
>org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:233)
> >        at
>
>org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1125)
> >        at
>
>org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
> >        at
>
>org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
> >        at
>
>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
> >        at
>
>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524)
> >        at
>
>javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> >        at
>
>javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >        at
>
>weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
> >        at
>
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
> >        at
>
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
> >        at
>
>weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445)
> >        at
>
>weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
> >        at
>
>weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105)
> >        at
>
>weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588)
> >        at
>
>weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
> >        at
>
>weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
> >  
> >
> >
> >How do i fix this. 
> >Am i missing something.
> >
> >Regards
> >Ashok Madhavan
> >1
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> >
> >
> >
> >  
> >
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> 


Mime
View raw message