Package nl.b3p.commons.security
Class XmlSecurityDatabase
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- nl.b3p.commons.security.XmlSecurityDatabase
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class XmlSecurityDatabase extends javax.servlet.http.HttpServlet- Version:
- $Revision: 1.1 $ $Date: 2004/04/29 16:47:27 $
- Author:
- Chris van Lith
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlSecurityDatabase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanbooleanAuthenticate(String username, String password)voiddestroy()Destroys the servlet.protected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handles the HTTPGETmethod.protected voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handles the HTTPPOSTmethod.static WebappUsersgetSecurityDatabase()Return the jndi path for this database.StringgetServletInfo()Returns a short description of the servlet.voidinit(javax.servlet.ServletConfig config)Initializes the servlet.static booleanisInitialized()static booleanisUserInRole(String username, String role)protected voidprocessRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Processes requests for both HTTPGETandPOSTmethods.-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletExceptionInitializes the servlet.- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()
Destroys the servlet.- Specified by:
destroyin interfacejavax.servlet.Servlet- Overrides:
destroyin classjavax.servlet.GenericServlet
-
processRequest
protected void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOExceptionProcesses requests for both HTTPGETandPOSTmethods.- Parameters:
request- servlet requestresponse- servlet response- Throws:
javax.servlet.ServletExceptionIOException
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOExceptionHandles the HTTPGETmethod.- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Parameters:
request- servlet requestresponse- servlet response- Throws:
javax.servlet.ServletExceptionIOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOExceptionHandles the HTTPPOSTmethod.- Overrides:
doPostin classjavax.servlet.http.HttpServlet- Parameters:
request- servlet requestresponse- servlet response- Throws:
javax.servlet.ServletExceptionIOException
-
getSecurityDatabase
public static WebappUsers getSecurityDatabase()
Return the jndi path for this database.- Returns:
-
isInitialized
public static boolean isInitialized()
-
getServletInfo
public String getServletInfo()
Returns a short description of the servlet.- Specified by:
getServletInfoin interfacejavax.servlet.Servlet- Overrides:
getServletInfoin classjavax.servlet.GenericServlet
-
-