qq_34745752
2017-01-08 02:52Struts 2 的验证跳转问题
刚学,表示不是很懂。比如说execute方法里面的
ActionContext ac = ActionContext.getContext;
if("test".equals(userName) &&
"test".equals(password)){
msg = "登录成功,欢迎" + this.userName;
returnthis.SUCCESS;
}else{
msg = "登录失败,用户名或密码错";
returnthis.ERROR;
}
难道不用获取用户的输入再进行判断的嘛?
这里表示很不懂
- 点赞
- 回答
- 收藏
- 复制链接分享
4条回答
为你推荐
- ssh项目页面url包含Action名时ajax上传文件返回错误500
- hibernate
- spring
- struts
- ajax
- tomcat
- 5个回答
- struts2+json
- it技术
- 互联网问答
- IT行业问题
- 计算机技术
- 编程语言问答
- 0个回答
- struts2 传值问题,希望大家帮我看看
- struts
- 0个回答
- struts1 中 用form的validate验证,但是始终没进入action
- struts
- 0个回答
- struts2表单验证 jsp页面显示不了错误信息
- struts
- 0个回答
换一换