URLRewrite filter does not work with multi-page form

I use the tuckey URLRewrite filter, which has one of its rules:

<rule>
    <name> Proxy  URL with jession ID </name>
    <note>

    </note>
    <condition type="parameter" name="ParamName">[\p{ASCII}]+</condition>
    <from>^/([^?]*)\.htm(.*)$</from>
    <to type="proxy">%{request-url};jsessionid=%{parameter:ParamName}$2</to>
</rule>

The problem occurs as soon as I add enctype="multipart/form-data"to my form (which uses the btw POST method). The filter cannot rewrite the URL.

Any ideas how to solve this problem?

+5
source share
1 answer

, , "parameter" JSESSIONID. ( , Tomcat) JSESSIONID , , . , JSP :

<form action="index.jsp" method="post">
    <input type="hidden" name="JSESSIONID" value="${pageContext.session.id}"/>
    <input type="submit"/>
</form>

JSESSIONID cookie , . , , :

<rule>
    <name>Proxy URL with jsession ID's</name>
    <note></note>
    <condition type="cookie" name="JSESSIONID"/>
    <from>^/([^?]*)\.htm(.*)$</from>
    <to type="proxy">%{request-url};jsessionid=%{cookie:JSESSIONID}$2</to>
</rule>

, (request-session-id-valid), cookie ( request-session-id- from-cookie) URL- post action ( request-session-id-from-url).

, UrlRewriteFilter , " URL-, jsessionid". , URL- , JSESSIONID , POST/GET.

http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.2/guide.html

Firefox/Firebug , POST , , . ( , , , Fiddler 2 ..).

+1

All Articles