Show TOC Start of Content Area

Procedure documentation Specifying Authentication in the JSP Locate the document in its SAP Library structure

Use

The first step is to specify authentication in the JSP. Afterwards, only users who are successfully authenticated on the AS Java can access the quick car rental application.

There are four types of authentication available: BASIC, DIGEST, FORM, and CLIENT-CERT. For more information about these types, see Structure linkAuthentication on AS Java.

For this tutorial, you will specify BASIC (Basic Authentication).

Prerequisites

This graphic is explained in the accompanying textThis graphic is explained in the accompanying text

The J2EE Development perspective is displayed in the SAP NetWeaver Developer Studio.

This graphic is explained in the accompanying textThis graphic is explained in the accompanying text

The quick car rental application’s Web client project, J2EE_QuickCarRentalWeb, is displayed in the J2EE Explorer.

Procedure

...

       1.      Expand the J2EE_QuickCarRentalWeb project.

       2.      Open the web.xml file by selecting it with a double-click.

The Developer Studio’s multi-page editor appears.

       3.      On the General tab:

                            a.      Select the Login configuration indicator.

                            b.      Select BASIC for the Authorization method.

See the preview below for an example of the input.

This graphic is explained in the accompanying text

       4.      Save the data.

Result

The <login-config> element is added to the deployment descriptors for the Web application in the web.xml file as shown below:

   <login-config>
      <auth-method>BASIC</auth-method>
   </login-config>

Next Step:

Specifying the Policy Domain to Use for Authentication

 

End of Content Area