public class HttpDirectoryServletEngine
extends java.lang.Object
HttpDirectoryServlet can be better customized for
application server environments.
To use this class:
Servlet class and create an instance of
HttpDirectoryServletEngine
doGet() method of your
servlet should call the corresponding doGet() method
of your HttpDirectoryServletEngine instance.
| Constructor and Description |
|---|
HttpDirectoryServletEngine(javax.servlet.Servlet servlet,
LdapDirectory directory)
Constructor for directory tunneling engine.
|
HttpDirectoryServletEngine(javax.servlet.Servlet servlet,
java.lang.String directoryIP,
java.lang.String directoryPort)
Constructor for directory tunneling engine.
|
HttpDirectoryServletEngine(javax.servlet.Servlet servlet,
User user)
Constructor for directory tunneling engine.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Handles the
doGet() method in the servlet. |
static java.lang.String |
getStackTraceAsString(java.lang.Exception e) |
public HttpDirectoryServletEngine(javax.servlet.Servlet servlet,
java.lang.String directoryIP,
java.lang.String directoryPort)
throws javax.servlet.UnavailableException
Constructor for directory tunneling engine.
servlet - servlet using this engine instancedirectoryIP - directory server name or IP addressdirectoryPort - directory server portjavax.servlet.UnavailableExceptionpublic HttpDirectoryServletEngine(javax.servlet.Servlet servlet,
User user)
throws javax.servlet.UnavailableException
Constructor for directory tunneling engine.
servlet - servlet using this engine instanceuser - a logged in Java Toolkit User with a valid connection from one of the setConnection(} methodsjavax.servlet.UnavailableExceptionpublic HttpDirectoryServletEngine(javax.servlet.Servlet servlet,
LdapDirectory directory)
throws javax.servlet.UnavailableException
Constructor for directory tunneling engine.
servlet - servlet using this engine instancedirectory - the connection to the directory. The object provided
must implement LdapDirectory and must have a copy constructor.javax.servlet.UnavailableExceptionpublic void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
doGet() method in the servlet.
In this sample implementation of the servlet, HttpDirectoryServletEngine
receives the Directory attribute and the Directory entry as a URL-encoded
search expression in the URI of the HTML GET request
(see ).
The HttpDirectoryClientdoGet() method decodes the URL, retrieves the requested
attribute from the Directory, and returns it in the response to the HTML
GET. A separate directory connection is used for each servlet
instance.
req - res - javax.servlet.ServletExceptionjava.io.IOExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionjavax.naming.NamingExceptionpublic static java.lang.String getStackTraceAsString(java.lang.Exception e)