Class SolutionContextListener
- java.lang.Object
-
- org.pentaho.platform.web.http.context.SolutionContextListener
-
- All Implemented Interfaces:
EventListener
,javax.servlet.ServletContextListener
public class SolutionContextListener extends Object implements javax.servlet.ServletContextListener
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
contextPath
protected static String
solutionPath
-
Constructor Summary
Constructors Constructor Description SolutionContextListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextDestroyed(javax.servlet.ServletContextEvent event)
void
contextInitialized(javax.servlet.ServletContextEvent event)
protected WebApplicationContext
createWebApplicationContext(String fullyQualifiedServerUrl, javax.servlet.ServletContext context)
Provide a simple extension point for someone to be able to override the behavior of the WebApplicationContext.protected String
getContextPath()
protected String
getRootPath()
void
showInitializationMessage(boolean initOk, String fullyQualifiedServerUrl)
-
-
-
Method Detail
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
- Specified by:
contextInitialized
in interfacejavax.servlet.ServletContextListener
-
createWebApplicationContext
protected WebApplicationContext createWebApplicationContext(String fullyQualifiedServerUrl, javax.servlet.ServletContext context)
Provide a simple extension point for someone to be able to override the behavior of the WebApplicationContext. To extend or change behavior, you will need to extend WebApplicationContext, and extend SolutionContextListener to override the createWebApplicationContext method. The subclassing is currently required because the initialization code above makes a specific setProperties call on the returned ApplicationContext method by casting it to a WebApplicationContext. Tangible example where this would be needed - context.getRealPath("") doesn't work the same way on all platforms. In some cases, you need to pass in a null, not an empty string. For other servers that don't unpack the war, the realPath call may need to be replaced with a parameter defined in the web.xml- Parameters:
fullyQualifiedServerUrl
-context
-- Returns:
-
showInitializationMessage
public void showInitializationMessage(boolean initOk, String fullyQualifiedServerUrl)
-
getContextPath
protected String getContextPath()
-
getRootPath
protected String getRootPath()
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent event)
- Specified by:
contextDestroyed
in interfacejavax.servlet.ServletContextListener
-
-