please, help to do url rewriting in java?.....i m new for java...

i m try url rewriting in java but it's not please any one help me...

i m try this in my project....

first i am add urlrewrite-3.2.0.jar in my library...then

change in the web.xml file like belowe..


<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewrite Filter</filter-class>

and add new .xml file in the WEB-INF Folder name like urlrewriter.xml

<rule match-type="regex">
The rule means that requests to /test/status/ will be redirected to /rewrite-status
the url will be rewritten.

<!-- <from>/trainer/trainerhome.xhtml?id=$1</from>
<to type="redirect">^/trainer/([a-z0-9]+)/$</to>-->

<to type="permanent-redirect" last="false" >%{context-path}/faces/trainer/trainerhome.xhtml/himanshuj</to>
<outbound-rule match-type="regex">
The outbound-rule specifies that when response.encodeURL is called (if you are using JSTL c:url)
the url /rewrite-status will be rewritten to /test/status/.

The above rule and this outbound-rule means that end users should never see the
url /rewrite-status only /test/status/ both in thier location bar and in hyperlinks
in your pages.
<!-- <from>/rewrite-status\id=</from>
<to>/trainer/trainerproduct/</to> -->

So i try this but it is not Please Any one can try to give answer....