楼主,不知道你是想要表达什么!你这里
<welcome-file-list>
<welcome-file>hello1.jsp</welcome-file>
</welcome-file-list>
定义了你的欢迎页面是:
hello1.jsp
而你分别
<security-constraint>
<web-resource-collection>
<web-resource-name>Success</web-resource-name>
<url-pattern>/welcome.jsp</url-pattern>
<url-pattern>/zuoye1_1.jsp</url-pattern>
<url-pattern>/zuoye1_2.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>web-user</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Login</web-resource-name>
<url-pattern>/login2.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>web-user</role-name>
</auth-constraint>
</security-constraint>定义了两个受保护区域。
如果你访问的uri是下面之一:
/login2.jsp
/welcome.jsp
/zuoye1_1.jsp
/zuoye1_2.jsp
都会默认转到login.jsp
要求你登录!
<welcome-file-list>
<welcome-file>hello1.jsp</welcome-file>
</welcome-file-list>
定义了你的欢迎页面是:
hello1.jsp
而你分别
<security-constraint>
<web-resource-collection>
<web-resource-name>Success</web-resource-name>
<url-pattern>/welcome.jsp</url-pattern>
<url-pattern>/zuoye1_1.jsp</url-pattern>
<url-pattern>/zuoye1_2.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>web-user</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Login</web-resource-name>
<url-pattern>/login2.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>web-user</role-name>
</auth-constraint>
</security-constraint>定义了两个受保护区域。
如果你访问的uri是下面之一:
/login2.jsp
/welcome.jsp
/zuoye1_1.jsp
/zuoye1_2.jsp
都会默认转到login.jsp
要求你登录!
解决方案 »
- js中获取前页面的参数
- java.lang.IllegalArgumentException: No SqlMapClient specified
- tomcat 调错
- 导出pdf。。。ext
- 怎样在网页中写象JAVA中COMBOX那样的可修改的下拉列表,且可提交到数据库
- jbuilder9。0里的TOMCAT4。1和我自己安装的TOMCAT5,0有什么不同?
- 讨论什么时候使用自定义标签?
- 如何再網頁裡面做出一個類似資源管器的東東(也要有資源管理器的功能喔)
- 一个tomcat connecton pool 的奇怪问题,请大家帮忙?? 下面是server.xml 和 报错信息
- jsp中如何处理radio的value,需要得到.
- 求助:关于编写论坛的问题!!!!!!
- 新手上门!请高手看看这个错误!
/login2.jsp
/welcome.jsp
/zuoye1_1.jsp
/zuoye1_2.jsp
都会默认转到login.jsp我的意图是:通过login.jsp登陆后,能够转到welcome.jsp。欢迎页面是hello1.jsp(就是默认的首页)可是登陆后,转到的页面却是hello1.jsp我想问的就是:通过login.jsp登陆后,如何能够自动转向到welcome.jsp谢谢~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~希望大家指点