Could not upload file with prettyfaces filter

Splash Forums PrettyFaces Users Could not upload file with prettyfaces filter


This topic contains 1 reply, has 2 voices, and was last updated by  Christian Kaltepoth 6 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #27099

    sujith ps

    When I am adding the filter codes in my web.xml

    		<filter-name>Pretty Filter</filter-name>
    		<filter-name>Pretty Filter</filter-name>

    I am unable to upload a file and getting exception :

     javax.servlet.ServletException: 0
    	at javax.faces.webapp.FacesServlet.service( [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
    	at io.undertow.servlet.handlers.ServletHandler.handleRequest( [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    	at com.ocpsoft.pretty.faces.servlet.PrettyFacesWrappedRequest.getParameter( [prettyfaces-jsf2-3.3.3.jar:]
    	at com.sun.faces.context.RequestParameterMap.containsKey( [jsf-impl-2.2.8-jbossorg-1.jar:]

    The jsf code is

    <h:form enctype="multipart/form-data" id="myForm">
    					<h:inputFile id="file" label="file"
    						value="#{myBean.uploadedFile}" required="true"
    						requiredMessage="File not selected !!">
    					<h:message style="color: red" for="file" />
    					<br />
    					<h:commandButton id="submit"
    						action="#{myBean.process}" value="upload file">
    						<f:param name="product" value="#{param.product}"></f:param>
    					<br />

    If I remove the filter code from web.xml, I am able to upload file and submit the form , otherwise I am getting the above mentioned exception.


    See my comment on stackoverflow:

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.