本例的功能是,必须指定用户名 scott/tiger 登陆的用户,方能查看系统中viewBook的这个资源,否则直接跳回登陆页面
登陆Action




























































权限检测拦截器































配置action (struts.xml)






































web.xml


























viewBook.jsp 放到web-inf下














login.jsp

































error.jsp






















运行login.jsp 用scott和tiger登陆,方能浏览viewBook.jsp
本例的功能是,必须指定用户名 scott/tiger 登陆的用户,方能查看系统中viewBook的这个资源,否则直接跳回登陆页面
登陆Action
权限检测拦截器
配置action (struts.xml)
web.xml
viewBook.jsp 放到web-inf下
login.jsp
error.jsp
运行login.jsp 用scott和tiger登陆,方能浏览viewBook.jsp