tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derrick Koes" <Derrick_K...@skillsoft.com>
Subject RE: File upload
Date Thu, 28 Oct 2004 16:31:51 GMT

The stack trace shows that
struts'org.apache.struts.upload.CommonsMultipartRequestHandler.handleReq
uest(CommonsMultipartRequestHandler.java:233) invokes commons file
upload.  I honestly don't know how struts decides to do this.  I'm
assuming like any other application by examining the request header.

I also assume this happens before struts determines what action to run,
otherwise I'd be getting to my action.

Derrick


<ContactInfo>
  <Name>Derrick Koes</Name>
  <Title>Senior Software Engineer</Title>
  <Company name="SkillSoft"
    url="http://www.skillsoft.com"/>
  <AIM>codeauthor2001</AIM>
  <Email>Derrick_Koes@skillsoft.com</Email>
  <Phone>(603) 305-1753</Phone>
  <Fax/>
  <Quote attributedTo="Yoda">No, try not, do
    or do not, there is no try.</Quote>
</ContactInfo>

-----Original Message-----
From: Allistair Crossley [mailto:Allistair.Crossley@QAS.com] 
Sent: Thursday, October 28, 2004 12:13 PM
To: Tomcat Users List
Subject: RE: File upload

oh i see. i guess we don't use it in this way.
org.apache.commons.fileupload.FileUploadException is being thrown before
you hit the action you say? how do you involve common fileupload direct
from the form post if you don't mind my asking?

> -----Original Message-----
> From: Derrick Koes [mailto:Derrick_Koes@skillsoft.com]
> Sent: 28 October 2004 17:08
> To: Tomcat Users List
> Subject: RE: File upload
> 
> 
>  
> 
> The error occurs before execution makes it to my upload action.
> 
> -----Original Message-----
> From: Allistair Crossley [mailto:Allistair.Crossley@QAS.com]
> Sent: Thursday, October 28, 2004 12:02 PM
> To: Tomcat Users List
> Subject: RE: File upload
> 
> you have the _exact_ same setup as we do here (except we are on 
> 5.0.25).
> we upload files using a multipart form and file control. then in the 
> struts action
> 
> List items = null;
> try {
> 	DiskFileUpload upload = new DiskFileUpload();
> 	items = upload.parseRequest(request); } catch
(FileUploadException 
> fuE) {
> 	logger.error(user.getUsername() + ": error.checkin.parse; " + 
> fuE.getMessage());
> 	errors.add(ActionMessages.GLOBAL_MESSAGE, 
>       	new ActionMessage("error.checkin.parse"));
> 	break DO_CHECKIN;
> }
> 
> FileItem primaryFile = null;
> while (iterator.hasNext()) {
> 	FileItem item = (FileItem) iterator.next();
>       ...
>                     
> 	// capture the actual upload file
>       if (! item.isFormField()) {
>       	primaryFile = item;
> 	}
> }
> 
> this was out of the box tomcat/common fileupload/struts, so you must 
> have configured something somewhere?
> 
> > -----Original Message-----
> > From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
> > Sent: 28 October 2004 16:56
> > To: Tomcat Users List
> > Subject: RE: File upload
> > 
> > 
> > 
> > Hi,
> > First question, as always: does it work on Tomcat standalone, i.e.
> > removing IIS, JK2, and the redirector out of the mix (just for now, 
> > for testing)?
> > 
> > Yoav Shapira http://www.yoavshapira.com
> >  
> > 
> > >-----Original Message-----
> > >From: Derrick Koes [mailto:Derrick_Koes@skillsoft.com]
> > >Sent: Thursday, October 28, 2004 11:52 AM
> > >To: Tomcat Users List
> > >Subject: File upload
> > >
> > >
> > >Configuration:
> > >
> > >Tomcat 5.0.24
> > >IIS 5.0
> > >JK2 connector
> > >Isapi_redirector2.dll
> > >Struts 1.1
> > >Commons file upload 1.0
> > >
> > >
> > >I seem to have an issue that when the file is a certain size it is 
> > >written to a temp file on the file system before it is
> parsed by the
> > >multipart parser (at least that's what the exception
> message leads me
> > to
> > >believe).  However, since the working directory is my web app 
> > >(/WEB-INF/ilt), the parser can't seem to find the file
> (not a fully
> > >qualified file name).  This is a guess, but if correct I
> > don't know how
> > >to fix the problem.
> > >
> > >Any help is appreciated.
> > >
> > >Belows is the stack trace and data from the request dumper valve:
> > >
> > >2004-10-28 10:59:32 RequestDumperValve[/ilt]:
> > >===============================================================
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI 
> > >=/ilt/ilt/iltPerformUpload.do
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:           
> authType=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:  
> characterEncoding=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:      
> > contentLength=340147
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >contentType=multipart/form-data;
> > >boundary=---------------------------41184676334
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:        
> contextPath=/ilt
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillP
> > ort=http:/
> > /
> > >dkoesxp/djk/home/index.cfm?selectdTab=0
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >cookie=CFMX_JSESSIONID=c8301990451098975559821
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >cookie=CFID=19459
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >cookie=CFTOKEN=98634115
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=accept=text/xml,application/xml,application/xhtml+xml,
> > text/html;
> > q
> > >=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=accept-language=en-us,en;q=0.5
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=connection=keep-alive
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=host=dkoesxp
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid
> > =3048D443A
> > D
> > >4341273FB5FED42958E7C4
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1;
> rv:1.7.3)
> > >Gecko/20041001 Firefox/0.10.1
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnT
> > oSkillPort
> > =
> > >http://dkoesxp/djk/home/index.cfm?selectdTab=0;
> > >CFMX_JSESSIONID=c8301990451098975559821; CFID=19459;
> CFTOKEN=98634115
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=content-length=340147
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=content-type=multipart/form-data;
> > >boundary=---------------------------41184676334
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=accept-encoding=gzip,deflate
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=keep-alive=300
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:             
> > locale=en_US
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:             
> method=POST
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:           
> pathInfo=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >protocol=HTTP/1.1
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:        
> queryString=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >remoteAddr=10.20.3.42
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >remoteHost=10.20.3.42
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:         
> remoteUser=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >requestedSessionId=3048D443AD4341273FB5FED42958E7C4
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:             
> scheme=http
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > serverName=dkoesxp
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:         serverPort=80
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >servletPath=/ilt/iltPerformUpload.do
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:           
> > isSecure=false
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >---------------------------------------------------------------
> > >2004-10-28 10:59:43 StandardWrapperValve[action]: 
> > Servlet.service() for
> > >servlet action threw exception
> > >org.apache.commons.fileupload.FileUploadException: Processing of 
> > >multipart/form-data request failed.
> > >\WEB-INF\ilt\temp\upload_00000001.tmp (The system cannot
> > find the path
> > >specified)
> > >	at
> > >org.apache.commons.fileupload.FileUploadBase.parseRequest(Fil
> > eUploadBas
> > e
> > >.java:429)
> > >	at
> > >org.apache.struts.upload.CommonsMultipartRequestHandler.handl
> > eRequest(C
> > o
> > >mmonsMultipartRequestHandler.java:233)
> > >	at
> > 
> >org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1209)
> > >	at
> > >org.apache.struts.action.RequestProcessor.processPopulate(Req
> > uestProces
> > s
> > >or.java:821)
> > >	at
> > >org.apache.struts.action.RequestProcessor.process(RequestProc
> > essor.java
> > :
> > >254)
> > >	at
> > >org.apache.struts.action.ActionServlet.process(ActionServlet.
> > java:1482)
> > >	at
> > 
> >org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> > >	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> > >	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> > >	at
> > >org.apache.catalina.core.ApplicationFilterChain.internalDoFil
> > ter(Applic
> > a
> > >tionFilterChain.java:237)
> > >	at
> > >org.apache.catalina.core.ApplicationFilterChain.doFilter(Appl
> > icationFil
> > t
> > >erChain.java:157)
> > >	at
> > >com.skillsoft.ilt.servlet.NDCContextFilter.doFilter(NDCContex
> > tFilter.ja
> > v
> > >a:62)
> > >	at
> > >org.apache.catalina.core.ApplicationFilterChain.internalDoFil
> > ter(Applic
> > a
> > >tionFilterChain.java:186)
> > >	at
> > >org.apache.catalina.core.ApplicationFilterChain.doFilter(Appl
> > icationFil
> > t
> > >erChain.java:157)
> > >	at
> > >com.skillsoft.ilt.servlet.HitCountFilter.doFilter(HitCountFil
> > ter.java:8
> > 6
> > >)
> > >	at
> > >org.apache.catalina.core.ApplicationFilterChain.internalDoFil
> > ter(Applic
> > a
> > >tionFilterChain.java:186)
> > >	at
> > >org.apache.catalina.core.ApplicationFilterChain.doFilter(Appl
> > icationFil
> > t
> > >erChain.java:157)
> > >	at
> > >org.apache.catalina.core.StandardWrapperValve.invoke(Standard
> > WrapperVal
> > v
> > >e.java:214)
> > >	at
> > >org.apache.catalina.core.StandardValveContext.invokeNext(Stan
> > dardValveC
> > o
> > >ntext.java:104)
> > >	at
> > >org.apache.catalina.core.StandardPipeline.invoke(StandardPipe
> > line.java:
> > 5
> > >20)
> > >	at
> > >org.apache.catalina.core.StandardContextValve.invokeInternal(
> > StandardCo
> > n
> > >textValve.java:198)
> > >	at
> > >org.apache.catalina.core.StandardContextValve.invoke(Standard
> > ContextVal
> > v
> > >e.java:152)
> > >	at
> > >org.apache.catalina.core.StandardValveContext.invokeNext(Stan
> > dardValveC
> > o
> > >ntext.java:104)
> > >	at
> > >org.apache.catalina.valves.RequestDumperValve.invoke(RequestD
> > umperValve
> > .
> > >java:169)
> > >	at
> > >org.apache.catalina.core.StandardValveContext.invokeNext(Stan
> > dardValveC
> > o
> > >ntext.java:102)
> > >	at
> > >org.apache.catalina.core.StandardPipeline.invoke(StandardPipe
> > line.java:
> > 5
> > >20)
> > >	at
> > >org.apache.catalina.core.StandardHostValve.invoke(StandardHos
> > tValve.jav
> > a
> > >:137)
> > >	at
> > >org.apache.catalina.core.StandardValveContext.invokeNext(Stan
> > dardValveC
> > o
> > >ntext.java:104)
> > >	at
> > >org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepor
> > tValve.jav
> > a
> > >:117)
> > >	at
> > >org.apache.catalina.core.StandardValveContext.invokeNext(Stan
> > dardValveC
> > o
> > >ntext.java:102)
> > >	at
> > >org.apache.catalina.core.StandardPipeline.invoke(StandardPipe
> > line.java:
> > 5
> > >20)
> > >	at
> > >org.apache.catalina.core.StandardEngineValve.invoke(StandardE
> > ngineValve
> > .
> > >java:109)
> > >	at
> > >org.apache.catalina.core.StandardValveContext.invokeNext(Stan
> > dardValveC
> > o
> > >ntext.java:104)
> > >	at
> > >org.apache.catalina.core.StandardPipeline.invoke(StandardPipe
> > line.java:
> > 5
> > >20)
> > >	at
> > 
> >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > >	at
> > >org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter
> > .java:160)
> > >	at
> > 
> >org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:296)
> > >	at
> > >org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:372)
> > >	at
> > >org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:694)
> > >	at
> > >org.apache.jk.common.ChannelSocket.processConnection(ChannelS
> > ocket.java
> > :
> > >626)
> > >	at
> > >org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:807)
> > >	at
> > >org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> > (ThreadPoo
> > l
> > >.java:644)
> > >	at java.lang.Thread.run(Thread.java:534)
> > >
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >---------------------------------------------------------------
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:           
> authType=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:      contentLength=-1
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >contentType=text/html
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=Pragma=No-cache
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=Cache-Control=no-cache
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >header=Expires=Thu, 01 Jan 1970 00:00:00 GMT
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:            
> message=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:         
> remoteUser=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:             
> status=500
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >===============================================================
> > >
> > >
> > 
> >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: 
> tomcat-user-help@jakarta.apache.org
> > 
> > 
> > 
> > 
> > This e-mail, including any attachments, is a confidential business 
> > communication, and may contain information that is confidential, 
> > proprietary and/or privileged.  This e-mail is intended
> only for the
> > individual(s) to whom it is addressed, and may not be
> saved, copied,
> > printed, disclosed or used by anyone else.  If you are not the(an) 
> > intended recipient, please immediately delete this e-mail from your 
> > computer system and notify the sender.  Thank you.
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
> -------------------------------------------------------
> QAS Ltd.
> Developers of QuickAddress Software
> <a href="http://www.qas.com">www.qas.com</a>
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> -------------------------------------------------------
> </FONT>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

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




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


Mime
View raw message