struts问题严重

weizijia 2005-03-20 04:08:42
问题提示信息:
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>
...全文
137 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
weizijia 2005-06-13
  • 打赏
  • 举报
回复
sdf
非著名码农 2005-03-23
  • 打赏
  • 举报
回复
struts-config.xml的问题,贴出来
shrek_cn 2005-03-23
  • 打赏
  • 举报
回复
你的struts-config.xml文件没有写对
无欲则钢 2005-03-23
  • 打赏
  • 举报
回复
你的请求没配置好
ProgrammerPro 2005-03-23
  • 打赏
  • 举报
回复
404 Not Found
/userup.do
-------------------------------
这个错误与Action无关,把两个xml粘贴出来看看。
dalang81 2005-03-23
  • 打赏
  • 举报
回复
甚么意思?404地址没有找到,配置文件出错了!
bonniewater 2005-03-23
  • 打赏
  • 举报
回复
http://community.csdn.net/Expert/topic/3868/3868102.xml?temp=.170788

67,550

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧