com.raritantechnologies.quickstart.userInterface
Class LoginServlet
java.lang.Object
HttpServlet
com.raritantechnologies.quickstart.userInterface.LoginServlet
- public class LoginServlet
- extends HttpServlet
Implements a Login service. Handles access using a SecurityManager.
The SecurityManager used is either the default system SecurityManager (determined from the Config.properties file),
or a named SecurityManager passed in the "securityManager" http parameter.
Can be used to check access to a resource (such as a full-text link) - i.e. for purposes other than login access.
Can be initialized to use an ILoginHandler in the web.xml:
<servlet>
<servlet-name>[ servlet name - e.g. 'LoginServlet' ]</servlet-name>
<servlet-class>com.raritantechnologies.quickstart.userInterface.LoginServlet
<init-param>
<param-name>LoginHandler</param-name>
<param-value>[ name of LoginHandler here - matches name in SystemObject configuration ]</param-value>
</init-param>
<init-param>
<param-name>SecurityManager</param-name>
<param-value>[ name of SecurityManager here - matches name in main configuration XML ]</param-value>
</init-param>
<init-param>
<param-name>CheckAccess</param-name>
<param-value>true | false</param-value>
</init-param>
<init-param>
<param-name>RedirectPage</param-name>
<param-value>[ url to redirect to if login suceeds ]</param-value>
</init-param>
<init-param>
<param-name>ErrorPage</param-name>
<param-value>Redirect page to link to if login fails</param-value>
</init-param>
</servlet>
Developed by
Raritan Technologies Inc..
- Author:
- Ted Sullivan
- See Also:
- Serialized Form
|
Method Summary |
void |
init()
|
static boolean |
login(HttpServletRequest pReq,
HttpServletResponse pRes)
|
static boolean |
login(HttpServletRequest pReq,
HttpServletResponse pRes,
ILoginHandler pLoginHandler,
java.lang.String theSecurityManager)
|
void |
service(HttpServletRequest pReq,
HttpServletResponse pRes)
service method
Standard parameters for input are:
userName
password
securityManager
loginHandler
href (for secure linking)
errorPage (optional)
checkAccess (optional - true or false)
noAccessPage ( optional )
accessName (optional )
successAttr |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoginServlet
public LoginServlet()
init
public void init()
throws ServletException
- Throws:
ServletException
service
public void service(HttpServletRequest pReq,
HttpServletResponse pRes)
throws ServletException,
java.io.IOException
- service method
Standard parameters for input are:
userName
password
securityManager
loginHandler
href (for secure linking)
errorPage (optional)
checkAccess (optional - true or false)
noAccessPage ( optional )
accessName (optional )
successAttr
- Throws:
ServletException
java.io.IOException
login
public static boolean login(HttpServletRequest pReq,
HttpServletResponse pRes)
login
public static boolean login(HttpServletRequest pReq,
HttpServletResponse pRes,
ILoginHandler pLoginHandler,
java.lang.String theSecurityManager)