I have o upload a file from UI with primefaces file uploader and it seems that it is not able to reach the ModelBean server side when i try to get a parameter from the request object. Otherwise, everything works FINE!! (i have to be specific so someone does not set this question as duplicate).
my web.xml configurartion for ythe file upload is this.
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>2097152</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
before reaching the MB, I let all the call to pass to this filter:
<filter>
<filter-name>PrimeFaces authorization check</filter-name>
<filter-class>utils.WebAuthFilter</filter-class>
</filter>
in WebAuthFilter servlet I have this code
boolean avoidValidation = Boolean.parseBoolean(request.getParameter("avoidLoginValidation"));
there is no problem with the parsing because the method return always false or true even if the parameter is equal to null.
the real problem is the
request.getParameter("avoidLoginValidation")
that seems to prevent any server-side action when i push the upload button. otherwise, averything is fine if I put "true" or "false" directly everithing works fine, without any error or problem.
can anyone explain why this is happening and how to avoid this type of behaviour.
thank you very much.