web.xml 配置进入首页
<security-constraint>
<display-name>Constraint1</display-name>
<web-resource-collection>
<web-resource-name>ProviderManager</web-resource-name>
<description/>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.html</url-pattern>
<url-pattern>/admin/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<description/>
<role-name>SecurityUsers</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<description/>
<role-name>SecurityUsers</role-name>
</security-role>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/login.jsp?error=1</form-error-page>
</form-login-config>
</login-config>