怎么设置在DispatchAction 默认执行方法,
问题:使用action继承DispatchAction后如果存在execute方法就不能执行自定义方法,
去掉execute方法后加个参数就能实现指定方法的调用,
不传参数的访问直接报错。。
问下各位前辈,有没有办法能实现 不传参数的时候指定执行某个方法。
问题:使用action继承DispatchAction后如果存在execute方法就不能执行自定义方法,
去掉execute方法后加个参数就能实现指定方法的调用,
不传参数的访问直接报错。。
问下各位前辈,有没有办法能实现 不传参数的时候指定执行某个方法。
public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
String sNo = request.getParameter("s_no");
String pNo = request.getParameter("p_no");
return main(mapping, form, request, response);
}