edu.vt.middleware.ldap.servlets
Class AttributeServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by edu.vt.middleware.ldap.servlets.AttributeServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public final class AttributeServlet
extends javax.servlet.http.HttpServlet

AttributeServlet is a servlet which queries an LDAP and returns the value of a single attribute. Example: http://www.server.com/Attribute?query=uid=dfisher&attr=givenName If you need to pass complex queries, such as (&(cn=daniel*)(surname=fisher)), then the query must be form encoded. The content returned by the servlet is of type text/plain, if you want to receive the content as application/octet-stream that can be specified by passing the content-type=octet param. The following init params can be set for this servlet: edu.vt.middleware.ldap.servlets.propertiesFile - to load ldap properties from

Version:
$Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
Author:
Middleware Services
See Also:
Serialized Form

Constructor Summary
AttributeServlet()
           
 
Method Summary
 void destroy()
          Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.
 void init(javax.servlet.ServletConfig config)
          Initialize this servlet.
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle all requests sent to this servlet.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeServlet

public AttributeServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initialize this servlet.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config - ServletConfig
Throws:
javax.servlet.ServletException - if an error occurs

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws javax.servlet.ServletException,
                    IOException
Handle all requests sent to this servlet.

Overrides:
service in class javax.servlet.http.HttpServlet
Parameters:
request - HttpServletRequest
response - HttpServletResponse
Throws:
javax.servlet.ServletException - if an error occurs
IOException - if an error occurs

destroy

public void destroy()
Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.