Syslog White Paper FAQ Examples JavaDoc Classloader
Protomatter Software v1.1.7

Class SyslogInitServlet

All Implemented Interfaces:, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SyslogInitServlet
extends javax.servlet.http.HttpServlet

A servlet that configures Syslog when its init() method is called. It should be configured in a WebApp by adding the following declaration to the web.xml file for the WebApp:

      <description>Syslog Initialization Servlet</description>


The config.xml init param is requred and should point to the XML configuration file for Syslog.

If the optional show.config.on.get init param is set to true (the default is false), then when the servlet is hit with a GET request, it will return the current Syslog configuration. Care should be taken when using this option since the syslog configuration file may contain database passwords, etc. It is a good idea to use declarative security to protect this servlet if you are allowing it to display the configuration file.

The <servlet-mapping> tag above is optional. If it is not specified, the servlet will still initialize syslog when the WebApp comes up, but the servlet will not be visible to web browsers. This is generally a good thing.

Also, please note that the Protomatter jar file should be placed in your system CLASSPATH and not just included in the lib directory for your WebApp. This will ensure that Syslog is available inside all software running in your application server.

See Also:
Serialized Form

Constructor Summary
          Default constructor.
Method Summary
 void destroy()
          Showdown syslog.
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
 void init(javax.servlet.ServletConfig config)
          Initialize syslog.
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, 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


public SyslogInitServlet()
Default constructor.
Method Detail


public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initialize syslog.
init in class javax.servlet.GenericServlet


public void destroy()
Showdown syslog.
destroy in class javax.servlet.GenericServlet


public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse resp)
           throws javax.servlet.ServletException,
doGet in class javax.servlet.http.HttpServlet

Protomatter Software v1.1.7
Copyright 1998-2002 Nate Sammons

Protomatter Software v1.1.7