com.isomorphic.base

## Class Init

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - com.isomorphic.base.Init

-     public class Init
      extends javax.servlet.http.HttpServlet

  The server-side component of Isomorphic SmartClient needs to know the location of the webRoot directory on the filesystem for many operations. Application Servers make this information available via the ServletContext class made available to Filters and Servlets.

  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).

  See Also:
    Serialized Form

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    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.

- - ### Method Detail

    - #### go

          public 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.
      Parameters:
        `context` - The ServletContext available via ServletConfig.getServletContext() in servlets and FilterConfig.getServletContext() in filters.