aspose file tools*
The moose likes Tomcat and the fly likes URLRewriting using urlrewrite.xml  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "URLRewriting using urlrewrite.xml  " Watch "URLRewriting using urlrewrite.xml  " New topic
Author

URLRewriting using urlrewrite.xml

Apurva Gaonkar
Greenhorn

Joined: Feb 07, 2011
Posts: 7



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

Joined: Oct 27, 2005
Posts: 19697
    
  20

Welcome to the Ranch!

I'll move this thread to our Tomcat forum, since I think that's a better place for it.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URLRewriting using urlrewrite.xml