Hi all,

I am using Struts 1.1 and I am trying to upload an image file to the 
server but I keep getting the below exception. I have used the 
example that comes with Struts under jakarta-struts-1.1\webapps and 
did exactly like they have but still getting the exception. I have 
put print statements all over the Action but the problem is that the 
request is not even getting to the action. No compile errors 
whatsoever. I also have commons-logging.jar in my WEB-INF\lib.

My JSP looks like:

<html:form action="maintainItem" enctype="multipart/form-data">

            .
            .
            .
 Select Image: <html:file name="maintainItemForm" property="myFile"/>
<br>
<html:submit onclick="dispatch.value='uploadImage'" value="Upload 
Image"/>
            .
            .
            .
</html:form>

I have defined the form in struts-config.xml and the request does not 
even hit the action.


[10/21/04 12:08:24:171 CDT] 6ea2663c RequestProces I 
org.apache.struts.action.RequestProcessor  Processing a 'POST' for 
path '/maintainItem'
[10/21/04 12:08:24:936 CDT] 6ea2663c WebGroup      E SRVE0026E: 
[Servlet Error]-[org.apache.commons.fileupload.FileUpload: method 
setSizeMax&#40;I&#41;V not found]: java.lang.NoSuchMethodError: 
org.apache.commons.fileupload.FileUpload: method setSizeMax(I)V not 
found
        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:798)
        at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:254)
        at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1422)
        at org.apache.struts.action.ActionServlet.doPost
(ActionServlet.java:523)
        at javax.servlet.http.HttpServlet.service
(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
        at 
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService
(StrictServletInstance.java:110)
        at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service
(StrictLifecycleServlet.java:174)
        at com.ibm.ws.webcontainer.servlet.IdleServletState.service
(StrictLifecycleServlet.java:313)
        at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service
(StrictLifecycleServlet.java:116)
        at com.ibm.ws.webcontainer.servlet.ServletInstance.service
(ServletInstance.java:283)
        at 
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch
(ValidServletReferenceState.java:42)
        at 
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch
(ServletInstanceReference.java:40)
        at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDis
patch(WebAppRequestDispatcher.java:948)
        at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch
(WebAppRequestDispatcher.java:530)
        at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward
(WebAppRequestDispatcher.java:176)
        at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward
(WebAppInvoker.java:79)
        at 
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook
(WebAppInvoker.java:201)
        at 
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvoca
tion(CachedInvocation.java:71)
        at 
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI
(ServletRequestProcessor.java:182)
        at 
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service
(OSEListener.java:334)
        at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest
(HttpConnection.java:56)
        at com.ibm.ws.http.HttpConnection.readAndHandleRequest
(HttpConnection.java:610)
        at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:435)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)

Any help would be appreciated.

Marwan





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to