The com.sun.appserv.security.ProgrammaticLogin class enables a user to log in 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. It returns true if the login succeeded, false if the login failed.