voyent
inputFile: uploadServlet exception  XML
Forum Index -> Components
Author Message
rthomas

Joined: 01/Feb/2008 00:00:00
Messages: 12
Offline


I have an inputFile element:

Code:
<ice:inputFile id="fu" label="Submit" actionListener="#{archiver.uploadFile}"/>


Upon pressing the Submit button,my action listener is called (it just logs a message), then:

13:17:00,785 ERROR [[uploadServlet]] Servlet.service() for servlet uploadServlet threw exception
java.lang.IllegalArgumentException: no file extension in servlet path: /uploadHtml
at org.jboss.seam.mock.MockViewHandler.getActionURL(MockViewHandler.java:44)
at org.jboss.seam.jsf.SeamViewHandler.getActionURL(SeamViewHandler.java:74)
at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:154)
at org.jboss.seam.faces.Redirect.execute(Redirect.java:139)
at org.jboss.seam.exception.DebugPageHandler.handle(DebugPageHandler.java:32)
at org.jboss.seam.exception.Exceptions.handle(Exceptions.java:75)
at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Unknown Source)

My web.xml includes the following, taken from the examples:

<context-param>
<param-name>com.icesoft.faces.uploadMaxFileSize</param-name>
<param-value>10000000</param-value>
</context-param>

<context-param>
<param-name>com.icesoft.faces.uploadDirectory</param-name>
<param-value>/</param-value>
</context-param>
.....
<servlet>
<servlet-name>uploadServlet</servlet-name>
<servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
.....
<servlet-mapping>
<servlet-name>uploadServlet</servlet-name>
<url-pattern>/uploadHtml</url-pattern>
</servlet-mapping>

I get the same result with both Icefaces 1.7.0 and 1.7.1. My commons-fileupload.jar is version 1.2.1

Am I missing something here? Thanks for any advice.
maruthy

Joined: 30/Jun/2009 00:00:00
Messages: 28
Offline


I too have the same problem please send me hits up if anyone finds solution.

Thanks!
Maruthy...
maruthy

Joined: 30/Jun/2009 00:00:00
Messages: 28
Offline


Finally i got the solution.
Solution is include following code in your web.xml

increase uploadMaxFileSize from 10000000 to 524288000. rest are same

<context-param>
<param-name>com.icesoft.faces.uploadMaxFileSize</param-name>
<param-value>524288000</param-value>
</context-param>

Thanks!
Maruthy...
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team