|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.module.core.MMBaseContext
Using MMBaseContext class you can retrieve the servletContext from anywhere using the get method.
| Constructor Summary | |
MMBaseContext()
|
|
| Method Summary | |
static java.lang.String |
getConfigPath()
Returns a string representing the mmbase.config parameter without a final File.separator. |
static java.lang.String |
getHtmlRoot()
Returns a string representing the mmbase.htmlroot parameter without a final File.separator. |
static java.lang.String |
getHtmlRootUrlPath()
Deprecated. should not be needed, and this information should be requested from the ServletRequest |
static java.lang.String |
getOutputFile()
Deprecated. use logging system |
static org.mmbase.module.core.ServletContext |
getServletContext()
Returns the ServeltContext used to initialize MMBase. |
static void |
init()
Initialize MMBase using system properties only. |
static void |
init(org.mmbase.module.core.ServletContext servletContext)
Initialize MMBase using a SevletContext. |
static void |
init(java.lang.String configPath,
boolean initlogging)
Initialize MMBase using a config path. |
static void |
initHtmlRoot()
Initialize mmbase.htmlroot parameter. |
static boolean |
isInitialized()
Returns whether this class has been initialized. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MMBaseContext()
| Method Detail |
public static void init(org.mmbase.module.core.ServletContext servletContext)
throws org.mmbase.module.ServletException
SevletContext. This method will
check the servlet configuration for context parameters mmbase.outputfile
and mmbase.config. If not found it will look for system properties.org.mmbase.module.ServletException - if mmbase.configpath is not set or is not a
directory or doesn't contain the expected
config files.
public static void init(java.lang.String configPath,
boolean initlogging)
throws java.lang.Exception
java.lang.Exception - if mmbase.config is not set or is not a
directory or doesn't contain the expected
config files.
public static void init()
throws java.lang.Exception
java.lang.Exception - if mmbase.config is not set or is not a
directory or doesn't contain the expected
config files.
public static void initHtmlRoot()
throws org.mmbase.module.ServletException
org.mmbase.module.ServletException - if mmbase.htmlroot is not set or is not a
directorypublic static org.mmbase.module.core.ServletContext getServletContext()
ServeltContext used to initialize MMBase.
Before calling this method the init method should be called.ServeltContext used to initialize MMBase or
null if MMBase was initilized without
ServletContextpublic static java.lang.String getConfigPath()
File.separator. Before calling this method the
init method should be called to make sure this parameter is set.public static java.lang.String getHtmlRoot()
File.separator. Before calling this method the
initHtmlRoot method should be called to make sure this parameter is set.null if not
initializedpublic static java.lang.String getOutputFile()
System.out and
System.err output is redirected. Before calling this method
the init method should be called.null if not setpublic static java.lang.String getHtmlRootUrlPath()
public static boolean isInitialized()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||