The com.sun.appserv.security.ProgrammaticLogin class enables a user to perform login programmatically.
The login method for servlets or JSPs has the following signature:
public Boolean login(String user, String password, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
This method:
Performs the authentication
Returns true if login succeeded, false if login failed