tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WILLIAMer <william.tz...@echannelopen.com.tw>
Subject Re: tomcat & url rewrite
Date Mon, 14 Sep 2009 10:15:58 GMT

I use  http://tuckey.org/urlrewrite/ url rewriter filter  for doing url
rewrite.
And i write the rule in urlrewrite.xml.

My rule like under
<rule>
    <from>/item_(.*).html</from>
    <to type="forward">/getItemPage?itemName=$1</to>
</rule>
If there is a url like /item_xxx.html, the url rewriter filter will redirect
to /getItemPage.action?itemName=xxx

In my some jsp, i write some code for link.
It look like a href="./item_<s:property value="item" />.html"> <s:property
value="item" />/a
"s:" is struts2 tag-lib, and the property value "item" is from database.

In there i got the a part of answer is the parse of tomcat is right.
The "/" char would make tomcat explain the directory Relation.
Thanks all, thanks Pid-6.

To Pid-6,
You maybe misunderstanding my text.
The url rewrite is not through tomcat or default servlet.
 
-- 
View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25433340.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message