<a href= " <%=request.getContextPath()%> /zhuti.do?method=showUser "> 编辑 </a>
public ActionForward showUser(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) { //String username=(String)request.getParameter( "username ");
System.out.println( "kkkkk ");
//?show sh=new show();
//List list= sh.selectInf(username);//取用户信息
//request.setAttribute( "ufi ",list);
return mapping.findForward( "toshow ");
} <action
parameter= "method "
input= "/form/show.jsp "
name= "zhutiForm "
path= "/zhuti "
scope= "request "
type= "com.yourcompany.struts.action.ZhutiAction " />
public ActionForward showUser(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) { //String username=(String)request.getParameter( "username ");
System.out.println( "kkkkk ");
//?show sh=new show();
//List list= sh.selectInf(username);//取用户信息
//request.setAttribute( "ufi ",list);
return mapping.findForward( "toshow ");
} <action
parameter= "method "
input= "/form/show.jsp "
name= "zhutiForm "
path= "/zhuti "
scope= "request "
type= "com.yourcompany.struts.action.ZhutiAction " />
如果是改成
<a href="<%=request.getContextPath()%>/zhuti.do"> 编辑 </a><action
parameter= "showUser"
input= "/form/show.jsp"
name= "zhutiForm"
path= "/zhuti"
scope= "request"
type= "com.yourcompany.struts.action.ZhutiAction" />