In Tomcat 7, I installed Realm to allow the container to control the authentication process. I also installed web.xml with the appropriate <security-constraint>and
<login-config>
<auth-method>FORM</auth-method>
<realm-name>MyRealm</realm-name>
<form-login-config>
<form-login-page>/public/login.jsp</form-login-page>
<form-error-page>/public/loginError.html</form-error-page>
</form-login-config>
</login-config>
According to the login protocol chosen by the user in login.jsp (direct or through OAuth), the stream can be redirected to the servlet, where I need to manage some files before the call HttpServletRequest.login(), if it continues.
If this is not the case, I would like to redirect the stream back to the login page (i.e HttpServletResponse.sendRedirect()..
My question is: in my servlet, how can I program the login page in Web.xml?
, loginConfig StandardContext, , , - (StandardContext ApplicationContext, , , ApplicationContextFacade, , )
- , ?
!