struts 跳转问题
public ActionForward list(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)throws Exception{
Integer userId = 1; // 测试数据 userID 为 1;
System.out.println("this is the UserAddressAction running ! the method is add");
Map map = getUserAddressService().findUserAddress(userId);
request.setAttribute("map", map);
return mapping.findForward("userAddressManagement");
}
static{
System.out.println("this is the UserAddressAction running ! the method is static");
}
userAddressAction类 里面的方法
<action
name="baseForm"
parameter="method"
path="/userAddress"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward
name="userAddressManagement"
path="/WEB-INF/jsps/users/address/userAddress.jsp"/>
</action>
struts_config 里面的配置文件
<bean name="/userAddress" class="net.wy128.duds.struts.action.UserAddressAction" singleton="false">
<property name="userAddressService" ref="userAddressServiceImpl" />
</bean>
action 的配置文件
问题:访问/userAddress.do?method=list这个请求时,不能跳转到对应的页面
Action里面的静态方法执行出来了结果 但是未进入list 方法