outbound-rule in struts2 app

28 views
Skip to first unread message

NextOne

unread,
Dec 3, 2009, 12:48:54 PM12/3/09
to UrlRewrite
Hi,

I am using urlrewrite in struts 2 app, some rules are working and some
are not

now I am facing a new problem

I have the following rule which works for one parameter, but it's not
working when I change the rule to get 2 parameters

<outbound-rule>
<from>^/page_view\.action\?id=([0-9]+)$</from>
<to>/page/$1.htm</to>
</outbound-rule>


above rule works which getting one parameter but below rule is not
working for two paramenters

<outbound-rule>
<from>^/page_search\.action\?id=(.*)&amp;city=(.*)$</from>
<to>/page/$1/$2</to>
</outbound-rule>

here is the struts tags

<s:url id="namesurl" action="page_search" >
<s:param name="city" value="%{city}" />
<s:param name="id" value="%{id}" />
</s:url>
<s:a href="%{namesurl}" >name link</s:a>



can you please help me resolve this issue thanks
Reply all
Reply to author
Forward
0 new messages