• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

URLRewriting using urlrewrite.xml

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic