0
在struts 2,動作類映射可以在2種方式進行:(請原諒的錯誤的語法)建議將動作類映射到請求的哪種方式?
action = "action1" class = "class1" results = "results1"
action = "action2" class = "class2" results = "results2"
等爲每個請求
或每個action = 1 , 2 ....n
即1 Action類:
action = "action1" class = "class1" results = "results1" method = "method1"
action = "action2" class = "class1" results = "results1" method = "method2"
等等。即所有請求只有1個操作類。但是每個動作都有一個單獨的方法。
有沒有什麼最好的做法,當使用?