I have written a web-application in Struts 1 framework. Everything works fine but on form submission when user is forwarded to next page URL which is shown is actionname.do
. I don't want this Struts 1 default suffix on URL. Instead of it I would like to see page's name in URL. How to do it?
Note : I have tried editing servlet mapping in web.xml
. Have replaced /*.do
. But In that case even my index page doesn't open.
In your web.xml, replace url pattern
*.do
with/
/WEB-INF/web.xml
servlet-name
of theorg.apache.struts.action.ActionServlet
and theservlet-mapping
that corresponds to theservlet-name
.For example:
Finally, simply change the
url-pattern
to what you desire and redeploy the application.Modify in
web.xml
and change*.do
You can use this mapping
Then use Tuckey URL rewriter rule to change this to
/*