dcsimg
How to use the Upload Package of Struts
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shalvika_Sood
Posted On:   Thursday, September 30, 2004 11:47 PM


I am trying to use the example in struts-upload war for uploading a file,
but the minute i submit the page, I am getting a File Not Found exception.
What all do i have to do to be able to upload a file using the struts upload package??

Re: How to use the Upload Package of Struts - A new Problem

Posted By:   Shalvika_Sood  
Posted On:   Friday, October 1, 2004 07:02 AM

Hi i've got the solution to my first problem, but now the trouble i am facing with this is that when i submit the page after entering a file to be uploaded, i am getting the following exception:

java.lang.NoSuchMethodError

at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:219)

at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1055)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:816)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)

Unhandled Error/ exception thrown from service method of "org.apache.struts.action.ActionServlet". Error is: null

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.pramati.web.interceptors.ServiceInterceptor$ServiceAction.run(ServiceInterceptor.java:294)

at com.pramati.security.util.JAASSecurityHelper.doAs(JAASSecurityHelper.java:145)

at java.lang.reflect.Method.invoke(Native Method)

at com.pramati.services.security.spi.SecurityHelper.doAs(SecurityHelper.java:130)

at com.pramati.web.interceptors.ServiceInterceptor.preProcess(ServiceInterceptor.java:141)

at com.pramati.web.interceptors.core.DefaultInterceptor.process(DefaultInterceptor.java:47)

at com.pramati.web.interceptors.core.InterceptorChainImpl.processNext(InterceptorChainImpl.java:48)

at
com.pramati.web.interceptors.FilterInterceptor.process(FilterInterceptor.java:92)

at com.pramati.web.interceptors.core.InterceptorChainImpl.processNext(InterceptorChainImpl.java:48)

at com.pramati.web.interceptors.core.DefaultInterceptor.process(DefaultInterceptor.java:48)

at com.pramati.web.interceptors.core.InterceptorChainImpl.processNext(InterceptorChainImpl.java:48)

at com.pramati.web.interceptors.core.DefaultInterceptor.process(DefaultInterceptor.java:48)

at com.pramati.web.interceptors.core.InterceptorChainImpl.processNext(InterceptorChainImpl.java:48)

at com.pramati.web.interceptors.core.DefaultInterceptor.process(DefaultInterceptor.java:48)

at com.pramati.web.interceptors.core.InterceptorChainImpl.processNext(InterceptorChainImpl.java:48)

at com.pramati.web.interceptors.core.DefaultProcessContainer.process(DefaultProcessContainer.java:88)
at com.pramati.web.core.WorkerThread.run(WorkerThread.java:54)

at com.pramati.web.core.AcceptorThread.run(AcceptorThread.java:121)

I have the fileupload-1.0.jar and the latest jar of struts.
Infact i checked out the struts jar the the class CommonsMultipartRequestHandler
does indeed have the definition for the above method handleRequest.
Can someone please help me coz i have been stuck on this for two days now!
About | Sitemap | Contact