struts不执行方法
这是我的ACTION:
public ActionForward selectall(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
System.out.println("before");
UserinfoActionForm userform=(UserinfoActionForm) form;
try {
request.setAttribute("all", DAOFactory.getUserinfoInstance()
.QueryAll());
} catch (Exception e) {
}
System.out.println("after");
return mapping.findForward("list");
}
这是我的JSP:
<a href="user.do?status=selectall">用户管理</a><p>
这是我的配置文件:
<action name="UserinfoForm" path="/user" attribute="UserinfoForm" input="/errors.jsp"
type="cn.telmedia.cmsa.userinfo.action.UserinfoAction" scope="request" parameter="status">
<forward name="success" path="/success.jsp" contextRelative="true"></forward>
<forward name="fail" path="/success.jsp" contextRelative="true"></forward>
<forward name="insertdo" path="/insert_do.jsp"></forward>
<forward name="update" path="/update.jsp"></forward>
<forward name="updatedo" path="/update_do.jsp"></forward>
<forward name="deletedo" path="/delete_do.jsp" contextRelative="true"></forward>
<forward name="list" path="/user/user_list.jsp" contextRelative="true"></forward>
</action>
为什么我点这个的时候<a href="user.do?status=selectall">用户管理</a><p>不执行ACTION里的方法啊?一运行就到了input上的页面上啊?
public ActionForward selectall(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
System.out.println("before");
UserinfoActionForm userform=(UserinfoActionForm) form;
try {
request.setAttribute("all", DAOFactory.getUserinfoInstance()
.QueryAll());
} catch (Exception e) {
}
System.out.println("after");
return mapping.findForward("list");
}
这是我的JSP:
<a href="user.do?status=selectall">用户管理</a><p>
这是我的配置文件:
<action name="UserinfoForm" path="/user" attribute="UserinfoForm" input="/errors.jsp"
type="cn.telmedia.cmsa.userinfo.action.UserinfoAction" scope="request" parameter="status">
<forward name="success" path="/success.jsp" contextRelative="true"></forward>
<forward name="fail" path="/success.jsp" contextRelative="true"></forward>
<forward name="insertdo" path="/insert_do.jsp"></forward>
<forward name="update" path="/update.jsp"></forward>
<forward name="updatedo" path="/update_do.jsp"></forward>
<forward name="deletedo" path="/delete_do.jsp" contextRelative="true"></forward>
<forward name="list" path="/user/user_list.jsp" contextRelative="true"></forward>
</action>
为什么我点这个的时候<a href="user.do?status=selectall">用户管理</a><p>不执行ACTION里的方法啊?一运行就到了input上的页面上啊?
...全文
相关推荐
struts2类型转换convertToString不被调用的疑惑
博文链接:https://gyj129129.iteye.com/blog/226261
Struts2中Action中是否需要实现Execute方法
主要介绍了Struts2中Action中是否需要实现Execute方法的相关资料,需要的朋友可以参考下
struts2拦截器实现拦截不文明字迹
使用struts的拦截器拦截一些敏感性的词或一些非法或不文秘的言论
Struts2远程执行漏洞 Jar包集合体
解决S2-057、S2-048、S2-046、S2-045、S2-016、S2-019、S2-037、S2-032远程执行漏洞
Struts2动态方法调用
Struts2动态方法调用 包括 1.js方法调用 2.普通的表单提交调用 3.通配符


