STRUTS2 ACTION的扩展名默认为.action,在struts1.X前为.do,如果要把STRUTS2的ACTION 的扩展名也改成.do可以按如下方法做。
方法一
struts.xml
- < struts >
- < constant name = "struts.action.extension" value = "do" /> //注意这里
- < package name = "default" extends = "struts-default" namespace = "/example" >
- < action name = "HelloWord" class = "example.HelloWord" >
- < result name = "SUCCESS" > /example/HelloWord.jsp </ result >
- </ action >
- </ package >
- <!--
- <include file="example.xml"/>
- -->
- <!-- Add packages here -->
- </ struts >
方法二