org.springframework.web.util
Class Log4jConfigServlet
java.lang.Object
   javax.servlet.GenericServlet
javax.servlet.GenericServlet
       javax.servlet.http.HttpServlet
javax.servlet.http.HttpServlet
           org.springframework.web.util.Log4jConfigServlet
org.springframework.web.util.Log4jConfigServlet
- All Implemented Interfaces: 
- Serializable, Servlet, ServletConfig
- public class Log4jConfigServlet 
- extends HttpServlet
Bootstrap servlet for custom log4j initialization in a web environment.
 Delegates to Log4jWebConfigurer (see its javadoc for configuration details).
 WARNING: Assumes an expanded WAR file, both for loading the configuration
 file and for writing the log files. If you want to keep your WAR unexpanded or
 don't need application-specific log files within the WAR directory, don't use
 log4j setup within the application (thus, don't use Log4jConfigListener or
 Log4jConfigServlet). Instead, use a global, VM-wide log4j setup (for example,
 in JBoss) or JDK 1.4's java.util.logging (which is global too).
 
Note: This servlet should have a lower load-on-startup value
 in web.xml than ContextLoaderServlet, when using custom log4j
 initialization.
 
Note that this class has been deprecated for containers implementing
 Servlet API 2.4 or higher, in favor of Log4jConfigListener.
 According to Servlet 2.4, listeners must be initialized before load-on-startup
 servlets. Many Servlet 2.3 containers already enforce this behavior
 (see ContextLoaderServlet javadocs for details). If you use such a container,
 this servlet can be replaced with Log4jConfigListener.
- Since:
- 12.08.2003
- Author:
- Juergen Hoeller, Darren Davison
- See Also:
- Log4jWebConfigurer,- Log4jConfigListener,- ContextLoaderServlet, 
Serialized Form
 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
Log4jConfigServlet
public Log4jConfigServlet()
init
public void init()
- 
- Overrides:
- initin class- GenericServlet
 
- 
 
destroy
public void destroy()
- 
- Specified by:
- destroyin interface- Servlet
- Overrides:
- destroyin class- GenericServlet
 
- 
 
service
public void service(HttpServletRequest request,
                    HttpServletResponse response)
             throws IOException
- This should never even be called since no mapping to this servlet should
 ever be created in web.xml. That's why a correctly invoked Servlet 2.3
 listener is much more appropriate for initialization work ;-)
 
- 
- Overrides:
- servicein class- HttpServlet
 
- 
- Throws:
- IOException
 
getServletInfo
public String getServletInfo()
- 
- Specified by:
- getServletInfoin interface- Servlet
- Overrides:
- getServletInfoin class- GenericServlet
 
- 
 
Copyright © 2002-2008 The Spring Framework.