I migrated a struts1 page to struts2 in an application. However, I still need the old page’s URL of “/login.do” to be accessible for backwards compatibility.
How can I redirect/map the “login.do” URL to “login.action”?
I believe that this can be accomplished by writing a filter class, but I don’t want to do that because it seems too complicated for the task. There has to be a way to do it in web.xml, struts.xml or struts-config.xml.
I’ll buy the person with best answer a beer (in Phoenix). 🙂
Change the action extension. This is from the default
struts.properties:XML configuration of constants is preferred, however, so I’d put it in your
struts.xml.It also avoids an actual redirect, although a filter for that is trivial.