views:

15

answers:

1

By default, Struts 2 uses the suffix .action to represent action URLs. So, even if I want to get to a login page, I need to use a URL something like : http://mysite.com/login.action.

But I feel the above URL is not flexible and not SEO friendly. So, is there any way to avoid the .action suffix or any suffixes completely and just use plain URLs (eg: http://mysite.com/login)?

A: 

Yes, it is possible, you can use something like this <constant name="struts.action.extension" value="htm"> in struts.xml file

jitm