struts2 诠注配置

struts2 注解配置1、web.xml多个Action在类方法上加注解 //@Action(value add, results { @Result(na

struts2 注解配置
1、web.xml


多个Action


在类方法上加注解
 //@Action(value = "add", results = { @Result(name = "success", location = "/index.jsp") }) @Action(value = "save")public String save() {try{adminMgr.insert("insertYz_admin", admin);}catch(Exception e){msg = e.toString();success = false;}return  this.SUCCESS;}