楼主,不知道你是想要表达什么!你这里   
<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
要求你登录!

解决方案 »

  1.   

    刚弄这个,还不太会,,,,是的,还没有登陆的时候,,
    /login2.jsp
    /welcome.jsp
    /zuoye1_1.jsp
    /zuoye1_2.jsp
    都会默认转到login.jsp我的意图是:通过login.jsp登陆后,能够转到welcome.jsp。欢迎页面是hello1.jsp(就是默认的首页)可是登陆后,转到的页面却是hello1.jsp我想问的就是:通过login.jsp登陆后,如何能够自动转向到welcome.jsp谢谢~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~希望大家指点