因為我之前學過structs2和springmvc,structs2默認的是以.action為后綴,springmvc是以.do為后綴。structs1也是.do。網上查了下。這兩者並沒什么區別,只是名字不同而已。
structs2修改為.do后綴的方法如下:
可以在struts.xml中costant標簽中,設置“struts.action.extension”的值為do即可。。
<constant name="struts.action.extension" value="do"/>
並且value可以設置成任意值。比如.hello,.haha。你開心就好
springmvc我現在還不知道怎么改。但是controller可以接收.html和.do。在web.xml里配置servlet-mapping映射吧