摘要: 版本:struts2.1.6此实例实现功能:用户需要指定用户名登陆,登陆成功进入相应页面执行操作,否则返回到登陆页面进行登陆,当直接访问操作页面(登陆后才能访问的页面)时则不允许,须返回登陆页面。代码如下:一、页面login.jsp[xhtml]view plaincopyyuewei'Login-->User:Passoword:welcome.jsp[xhtml]view plaincopyyuewei'sWelcome-->登录成功后显示此页面showshow.jsp[xhtml]view plaincopyyuewei'sShow-->Show 阅读全文
posted @ 2013-12-16 22:14 山貓 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 需求:session超时时,返回登录页面,由于页面嵌套在iframe下,因此要跳转到登录页面的父页面,但是首页,登录页面等不需要进行跳转实现:java文件:SessionIterceptor.javaimport com.opensymphony.xwork2.ActionContext;import com.opensymphony.xwork2.ActionInvocation;import com.opensymphony.xwork2.interceptor.AbstractInterceptor;public class SessionIterceptor extends Abstr 阅读全文
posted @ 2013-12-16 22:13 山貓 阅读(606) 评论(0) 推荐(0) 编辑