I'm using Tomcat 6.0.24. As I know, jsessionid could be returned to the tomcat by urlrewriting or cookie. Why not use cookie instead?
2011/8/4 Javed <javed.at...@gmail.com>: > > I was using Tomcat 5.0.28 before using Tomcat 7.0.16. The application was > working perfectly fine. Recently, we have migrated from Tomcat 5 to Tomcat > 7. > > The application works fine for most of the part but gives problem with > URLRewriteFilter. > I have used URLRewriteFilter to convert Capital case request URI to > lowercase and SEO purpose. > The capital case convert rule looks like > > <rule match-type="regex"> > <name>Force URL filenames to lower case</name> > <note>Redirect rule to convert capital case URLs to small case with > parameters</note> > <condition type="request-uri" casesensitive="true" > next="or">^/.*[A-Z].*</condition> > <from>^/(.*)\?.*</from> > <to type="permanent-redirect" > last="true">%{context-path}/${lower:$1}?%{query-string}</to> > </rule> > > > when this rule processed in Tomcat 5, it is processed against request URI > "/XXXX/yyyyy/zzzzzz" (excluding quotes) where part of request URI is in > capital case i.e. XXXX > > During redirect URL is encoded which appends jsessionid. The redirected URL > looks like > /xxxx/yyyyy/zzzzzz;jessionid=A226083725B7B955569D86710420D1DF > > When browser calls above URL after redirect the new request is processed. > Now the request URI becomes > "/xxxx/yyyyy/zzzzzz" > > so it will not go to capital case rule and will be processed against SEO > rules. > > > In Tomcat 7 if I try the same URL which has request URI i.e. > "/XXXX/yyyyy/zzzzzz" (excluding quotes) where part of request URI is in > capital case i.e. XXXX > > During redirect URL is encoded which appends jsessionid. The redirected URL > looks like > /xxxx/yyyyy/zzzzzz;jessionid=BCE91A85A66AAFF384E854D59E5AC877 > > When browser calls above URL after redirect the new request is processed. > Now the request URI becomes > /xxxx/yyyyy/zzzzzz;jessionid=BCE91A85A66AAFF384E854D59E5AC877 > > Here it breaks for me on Tomcat 7 > The jsessionid is part of request URI. Hence it again goes to capital case > rule which it shouldn't. Then again same thing happens and new jsessionid is > appended to URL as shown in following URI > > /xxxx/yyyyy/zzzzzz;jsessionid=bce91a85a66aaff384e854d59e5ac877;jsessionid=BCE91A85A66AAFF384E854D59E5AC877 > > This goes on happening in infinite loop and browser throws error "Page isn't > redirecting properly" > > Can anybody tell me what feature/change in Tomcat 7 responsible for this > behavior? > I will really appreciate any help on this. > Thanks in advance. > > -Javed Attar > -- > View this message in context: > http://old.nabble.com/Tomcat-7-adds-jsessionid-in-request-URI-as-opposed-to-Tomcat-5-tp32192166p32192166.html > Sent from the Tomcat - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org