I am trying to understand tuckey urlRewrite to write a rule but am unable to do it.
I have a Servlet that has URL Pattern defined @WebServlet("/user/*"). At the load of Servlet I get URL like http://localhost:8080/Navigation/user/*.
How can I make a rule so whenever /user/ URL is loaded it should go to http://localhost:8080/Navigation/user/list. I tried this:
<rule>
<from>^/user/*$</from>
<to>/user/list</to>
</rule>
but this is not working.
You can use something like this:
Where
$1represents anything that is before/user/i.e. denoted by the first(.*).A read through this manual might also help.
Hope this helps.