![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
struts2
狼族_RYJ
这个作者很懒,什么都没留下…
展开
-
struts2中XML配置中result的值
result中的常见值得配置。1.dispatcher 配置如下所示/welcome.jsp作用:我们在A页面填写相关的数据,提交到后台的Action做以处理,然后将A页面填写的数据返回到相关的welcome页面。也就是说,可以将A页面中的数据传送到welcome页面,其实它只是一个request。使用场景:在login页面填写的userName和password,在后台的acti原创 2015-04-22 21:18:07 · 1662 阅读 · 0 评论 -
简单的全局404,500异常处理
通过struts2 的XML 文件配置全局404异常: /error.jsp 方式二:直接在web.xml文件中配置404和500的异常捕获: 404 /error.jsp 500 /error.jsp原创 2015-08-13 16:07:45 · 711 阅读 · 0 评论 -
About the struts2 some problem
1. Get access IP in the action :ServletActionContext.getRequest().getRemoteHost();2.Get session in the action and set value:ServletActionContext.getRequest().getSession().setAttribute("userName"原创 2015-08-18 16:28:26 · 764 阅读 · 0 评论