01: package com.opensymphony.webwork.views;
02:
03: import javax.servlet.ServletConfig;
04: import javax.servlet.ServletContext;
05: import javax.servlet.ServletException;
06: import javax.servlet.http.HttpServlet;
07:
08: /**
09: * A servlet that means to expose itself through a public static member
10: * variable such that its {@link ServletContext} could be accessible.
11: *
12: * An example of configuration in web.xml would be :-
13: * <pre>
14: * <servlet>
15: * <servlet-name>jspSupportServlet\</servlet-name>
16: * <servlet-class>com.opensymphony.webwork.views.JspSupportServlet</servlet-class>
17: * <load-on-startup>2</load-on-startup>
18: * </servlet>
19: * </pre>
20: *
21: * @author plightbo
22: * @version $Date: 2007-02-16 08:15:36 +0100 (Fri, 16 Feb 2007) $ $Id: JspSupportServlet.java 2846 2007-02-16 07:15:36Z tm_jee $
23: */
24: public class JspSupportServlet extends HttpServlet {
25:
26: private static final long serialVersionUID = -8268185076433481017L;
27:
28: public static JspSupportServlet jspSupportServlet;
29:
30: /**
31: * This method merely expose this servlet as a public static member variable
32: * called 'jspSupportServlet'.
33: */
34: public void init(ServletConfig servletConfig)
35: throws ServletException {
36: super.init(servletConfig);
37:
38: jspSupportServlet = this;
39: }
40: }
|