public class Init
extends javax.servlet.http.HttpServlet
To ensure correct operation of the SmartClient server-side componentry, register this servlet in your web.xml with a load-on-startup priority of 1 (or zero if you container permits this) - like so:
<servlet> <servlet-name>Init</servlet-name> <servlet-class>com.isomorphic.base.Init</servlet-class> <load-on-startup>1</load-on-startup> </servlet>This servlet is necessary purely for initialization purposes, so it is not necessary to configure a servlet-mapping for it.
Note: if you do not wish to (or cannot) register this servlet in web.xml, you can instead call its static go() method with your ServletContext from your jsp, Servlet or Filter (you can call filterConfig.getServletContext() to obtain a ServletContext from within a Filter init() method).
Modifier and Type | Method and Description |
---|---|
static void | go(javax.servlet.ServletContext context, boolean skipLogInit) Calling this method before using code that requires webRoot is equivalent to registering this servlet in web.xml. |
public static void go(javax.servlet.ServletContext context, boolean skipLogInit)
context
- The ServletContext available via ServletConfig.getServletContext() in servlets and FilterConfig.getServletContext() in filters.