03.05.2015 Views

IBM WebSphere V5.0 Security - CGISecurity

IBM WebSphere V5.0 Security - CGISecurity

IBM WebSphere V5.0 Security - CGISecurity

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example 4-4 Login-config section of the Web deployment descriptor<br />

<br />

FORM<br />

Webbank realm<br />

<br />

/login/login.html<br />

/login/loginerror.html<br />

<br />

<br />

Simple form-based login does not require any extra code development on the<br />

server side. Servlet j_security_check used by <strong>WebSphere</strong> Application Server<br />

enforces only the name of the input fields that the developer should put in the<br />

custom Login Form.<br />

These fields are as follows:<br />

► j_username should be the input field in which a user will type the user ID.<br />

► j_password should be the input field into which user will type the password.<br />

The action required for the HTTP POST method is j_security_check. A simple<br />

HTML code for the custom Login Form is given in Example 4-5.<br />

Example 4-5 Sample custom login form from the ITSOBank application<br />

<br />

<br />

<br />

Userid:<br />

<br />

Password:<br />

<br />

&nbsp;<br />

<br />

<br />

<br />

Note: The j_security_check servlet will not work when global security is<br />

disabled; the application server will return a Page Not Found error.<br />

This is also true for the ibm_security_logout servlet, as you will see later.<br />

Chapter 4. Securing Web components 61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!