當在stuts中需要在一個action中定義多個方法時,可以使用dispathAction來完成
下面是測試的一個簡單的例子:
需要注意的是要將action中的execute方法刪除!!!
調用:
http://127.0.0.1:8080/test/dispath.do?method=Add
http://127.0.0.1:8080/test/dispath.do?method=Delete