Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLRewriting using urlrewrite.xml

 
Apurva Gaonkar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



I want ti use feature of urlrewriting in my project.
I have added jar urlrewrite-3.2.0.jar in my WEB-INF/lib directory. and also added WEB-INF/conf/urlrewrite.xml file .

I have set rules as follows <urlrewrite>

<rule>
<from>^/package/([0-9]+)$</from>
<to>viewpackagedeal.do?dealid=$1</to>
</rule>

<outbound-rule>
<from>^viewpackagedeal.do?dealid=([0-9]+)$</from>
<to >/package/$1</to>
</outbound-rule>


my output shloud be ------ > /viewpackagedeal.do?dealid=531 type


and in my JSP file I have link
<a href="viewpackagedeal.do?dealid=995" target="_blank">

I even triend doing <a href=<%response.encodeURL("viewpackagedeal.do?dealid=995")%> target="_blank"> still the it doesnot work ...

please help me ..I am going wrong some where ?
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

I'll move this thread to our Tomcat forum, since I think that's a better place for it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic