第一种方式:

在struts.xml的配置文件中添加 <constant name="struts.action.extension" value="do"></constant>

第二种方式:

在src下创建struts.properties
添加struts.action.extension=do
注:如果这样配置会覆盖struts.xml的配置

第三种方式:

在web.xml中配置

运行结果: