struts问题严重
问题提示信息:
404 Not Found
/userup.do was not found on this server.
--------------------------------------------------------------------------------
Resin 2.1.10 (built Wed Jun 18 09:16:53 PDT 2003)
Action代码如下:
public class User_U_Action
extends Action {
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
/**@todo: complete the business logic here, this is just a skeleton.*/
User_ActionForm user_ActionForm = (User_ActionForm) actionForm;
HttpSession session = httpServletRequest.getSession(); //得到session
String name;
name = (String) session.getAttribute("username");
//从session里取出username付给name
String pass = user_ActionForm.getPassword();
//得到密码
String sex = httpServletRequest.getParameter("ser");
String age = httpServletRequest.getParameter("age");
String age2 = httpServletRequest.getParameter("age2");
String age3 = httpServletRequest.getParameter("age3");
//年龄
String paper = httpServletRequest.getParameter("paper");
//证件号
String papertyp = httpServletRequest.getParameter("paperTyp");
//证件类型
String place = httpServletRequest.getParameter("place");
//住址
String phone = httpServletRequest.getParameter("phone");
//电话
String phonetyp = httpServletRequest.getParameter("phoneTyp");
// 电话类型
String ema = httpServletRequest.getParameter("ema");
//E-Mail
//得到提交过来的数据
String ageone = new String(age + "-" + age2 + "-" + age3);
//年龄和
User_Work work = new User_Work();
int x = work.Update(name,pass,sex,ageone,paper,papertyp,place,phone,phonetyp,ema);
if(x==0)
{return actionMapping.findForward("upok");}
else if (x==1)
{return actionMapping.findForward("err1");}
else{return actionMapping.findForward("err2");//跳转页面
}
struts-config.xml如下
<action input="/UserWork_Up.jsp" name="user_ActionForm" path="/userup" scope="session" type="useraction.User_U_Action">
<forward name="upok" path="/upok.htm" />
<forward name="err1" path="/error.jsp" />
<forward name="err2" path="/error.jsp" />
</action>