关于Struts的问题\希望大家帮忙解决
这是我的action
public class VillaConsisgnAction extends DispatchAction
{
//这是我这个action的第一个方法、运行时先运行这个方法、
public ActionForward addVilla(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
return mapping.findForward( " ");作用是转向另一个方法
}
//这是我这个action的第二个方法、由第一个方法的mapping来调用
public ActionForward addVillaPost(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
return mapping.findForward( " ");作用是转向另一个jsp
}
我的问题是在第一个mapping处应该怎么写、配置文件里面怎么写
------解决方案--------------------public ActionForward addVilla(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
return addVillaPost(mapping,form,request,response);
}
struts-config.xml不用改。