| com.jcorporate.expresso.core.servlet.StdServlet com.jcorporate.expresso.core.servlet.DBServlet com.jcorporate.expresso.core.servlet.InitServlet
All known Subclasses: com.jcorporate.expresso.core.servlet.DefaultInit,
InitServlet | abstract public class InitServlet extends DBServlet (Code) | | InitServlet is a "faceless" servlet that is automatically started when
the servlet container starts.
NOTE: All the properties files in this directory will be read in. For that reason
do NOT park old versions of renamed properties files in this directory, they might
conflict with other properties. Keep only current properties files in this directory.
The InitServlet first populates configuration beans in the ConfigManager. Then, it
initializes the DBPool with the dbvalues. Finally, the loadLists method is called.
The loadLists method is used to populate the ConfigManager with "lookup list"
vectors. A lookup list is a vector of ValidValue objects that does not change very
often. You can use this method to read in lookup lists one time and cache them in
the ConfigManager, making the code in your DBObjects getValidValues() methods much
cleaner and faster.
author: Adam Rossi since: Expresso 2.0 |
Constructor Summary | |
public | InitServlet() InitServlet constructor. |
Method Summary | |
public void | destroy() | public void | init(ServletConfig conf) This method is called when the server initializes. | abstract public void | loadLists() This method is used to load "lists" and cache them in ConfigManager list cache. |
InitServlet | public InitServlet()(Code) | | InitServlet constructor.
|
destroy | public void destroy()(Code) | | Called when the context is destroyed for either reload or application
close
|
init | public void init(ServletConfig conf) throws ServletException(Code) | | This method is called when the server initializes.
This method simply calls the ConfigManager.config method which
actually does the job of initializing Expresso.
Parameters: conf - The servlet Configuration paramter |
loadLists | abstract public void loadLists() throws DBException(Code) | | This method is used to load "lists" and cache them in ConfigManager list cache.
These lists are used to populate valid values for DBObjects.
Load a valid list (a vector containing ValidValue objects), and put it into the
list cache in ConfigManager by calling:
ConfigManager.setList("list_name", list_vector);
Example:
|
Fields inherited from com.jcorporate.expresso.core.servlet.DBServlet | final protected static String thisClass(Code)(Java Doc)
|
Methods inherited from com.jcorporate.expresso.core.servlet.DBServlet | public void destroy()(Code)(Java Doc) public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException(Code)(Java Doc) protected String getDBName(HttpServletRequest request)(Code)(Java Doc) public void init(ServletConfig sc) throws ServletException(Code)(Java Doc) public boolean requireLogin(HttpServletRequest req, HttpServletResponse res, String nextURL) throws IOException, ServletException, DBException, LogException, HtmlException(Code)(Java Doc) protected void setDBName(String newDBName, HttpServletRequest req) throws ServletException(Code)(Java Doc) public void setSkipLogin(boolean newSkip)(Code)(Java Doc) public void setupChannels(HttpServletRequest req) throws ServletException(Code)(Java Doc)
|
Methods inherited from com.jcorporate.expresso.core.servlet.StdServlet | public void destroy()(Code)(Java Doc) public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException(Code)(Java Doc) protected String getSchema()(Code)(Java Doc) protected String getServerName(HttpServletRequest request)(Code)(Java Doc) public int getServerPort(HttpServletRequest request)(Code)(Java Doc) public String getServletPrefix(HttpServletRequest request) throws ServletException(Code)(Java Doc) public String getServletPrefix(HttpServletRequest request, String servlet) throws ServletException(Code)(Java Doc) public String getString(HttpServletRequest req, String stringCode, Object[] args) throws ServletException(Code)(Java Doc) public String getString(HttpServletRequest req, String stringCode) throws ServletException(Code)(Java Doc) public String getTitle()(Code)(Java Doc) protected void handleParam(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) public void init(ServletConfig sc) throws ServletException(Code)(Java Doc) protected void setSchema(String schemaClass)(Code)(Java Doc) protected void showError(String errorMessage, HttpServletRequest request, HttpServletResponse response) throws ServletException(Code)(Java Doc) protected void showError(Throwable t, HttpServletRequest request, HttpServletResponse response) throws ServletException(Code)(Java Doc)
|
|
|