Reply To: File upload component under prettyfaces mapped url doesn't upload anything

Splash Forums PrettyFaces Users File upload component under prettyfaces mapped url doesn't upload anything Reply To: File upload component under prettyfaces mapped url doesn't upload anything

#26391

@ageldt:

I think < and > don’t work well in forum topics any may cause this error. Could you check that?

@giates:

I don’t know about any workarounds for this issue which work on Glassfish. Sorry.

As described in the FAQ, there is really no way for Rewrite to work around this issue. Rewrite has to use methods like HttpServletRequest.getParameter() which breaks multipart requests in some containers.

AFAIK the Tomcat workaround doesn’t work in Glassfish (although Glassfish uses Tomcat internally, right?). Wildfly in the newest version should work. Older versions have to be patched.

One thing that COULD work in Glassfish is to create a rule that basically prevents that other Rewrite rules are evaluated for the URL that contains the upload component. So you could try to add this in front of all your other rules:

.addRule()
.when( Direction.isInbound().and( Path.matches( "/somepath/my-upload.jsf" ) ) )
.perform( Lifecycle.handled() )

But this means that you have a Join or anything else for this URL.

It’s just a guess. Perhaps it helps. 🙂