Chapter 14: Tomcat Security The element is used

Chapter 14: Tomcat Security The element is used to specify how users authenticate with the Web application. determines which of the authentication mechanisms described here is used. Possible values include BASIC, DIGEST, FORM, and CLIENT-CERT. Because we ve chosen FORM, the
element must be nested in the element.
identifies which page in the Web application is used to authenticate the user ( /login.jsp) and which page is displayed when authentication fails (/notAuthenticated.jsp). No page is configured to be displayed when authentication succeeds. Instead, the user is presented with the URL that triggered the authentication in the first place. Authentication Form In the preceding example, the URL /login.jspis used to specify the login form. While any valid HTML page containing an HTML form may be used, the HTML form used to send the credentials to the server must be configured in three specific ways: . The value of its

element s action attribute must be j_security_check. . The username must be sent in a field named j_username. . The password must be sent in a field named j_password. For this example, create a Web application named secure. In a Web application directory named secure, place the following login.jspinto it. Following is an example of a conforming form:
>
Username:
Password:

The error page, named notAuthenticated.jsp, can contain any HTML that conveys to the user the fact that the authentication attempt failed. You should also create a page named index.jspthat contains the fictitious main page of the application. This page is shown if your authentication is successful.

If you looking for unlimited one inclusive web hosting plan please check cheap web hosting website.

Comments are closed.