Specifying Authentication for Java Applications 
After you specify the authentication method, only users who have authenticated successfully on the AS Java can access the application.
There are four types of authentication available: BASIC, FORM, CLIENT-CERT and DIGEST. More information about the different authentication types: AS Java Authentication Infrastructure.
To specify the authentication type, you modify the web.xml file in the Developer Studio.
Open theweb.xml file.
Specify the authentication type.
Add the following code to the file (for this example we assume that the authentication type to use is BASIC):
Syntax
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
Save the file.
Note
If you do not specify an authentication method for the application, then the AS Java uses a globally defined authentication method for authenticating the user. By default this method is FORM. You can change the globally defined method with the SAP NetWeaver Administrator.