springmvc控制请求跳转,全部配置在配置文件中,不在类里面写哪个请求返回到哪个页面和
比如hello.do请求过来返回到index.jsp 我在一个xml文件中配置这些信息
用XML配置没有使用注解来得快。如下
@RequestMapping("/hello.do")
public String queryAllSettUnit() {
return “index”;
}
extends="default">
<action name="listTobaccoTechnicSpec"
class="com.supacrm.test.web.action.market.technicspec.TechnicSpecListAction">
<result>/jsp/test/market/technicspec/list.jsp</result>
<result name="input">
/jsp/test/market/technicspec/list.jsp
</result>
</action>
</package>