struts2 默认只处理/* 和*.action。 所以在web.xml中,如果不加以说明。<url-pattern>标签只能填写*.action或/* 。如果想使用*.do, 则需要 在struts.xml中添加
<constant name="struts.action.extension" value="do"/> 或者action和do同时使用
<constant name="struts.action.extension" value="do,action"/>
struts.xml:
success.html error.jsp
web.xml:
struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 *.action
index.xml: