|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.Application
org.apache.wicket.protocol.http.WebApplication
org.apache.wicket.examples.WicketExampleApplication
org.apache.wicket.examples.requestmapper.RequestMapperApplication
public class RequestMapperApplication
Field Summary |
---|
Fields inherited from class org.apache.wicket.Application |
---|
CONFIGURATION |
Constructor Summary | |
---|---|
RequestMapperApplication()
|
Method Summary | |
---|---|
RuntimeConfigurationType |
getConfigurationType()
Gets the configuration mode to use for configuring the app, either RuntimeConfigurationType.DEVELOPMENT or RuntimeConfigurationType.DEPLOYMENT . |
Class<? extends Page> |
getHomePage()
Application subclasses must specify a home page class by implementing this abstract method. |
void |
init()
Initialize; if you need the wicket servlet/filter for initialization, e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestMapperApplication()
Method Detail |
---|
public Class<? extends Page> getHomePage()
Application
getHomePage
in class Application
Application.getHomePage()
public void init()
WebApplication
init
in class WicketExampleApplication
WicketExampleApplication.init()
public RuntimeConfigurationType getConfigurationType()
WebApplication
RuntimeConfigurationType.DEVELOPMENT
or RuntimeConfigurationType.DEPLOYMENT
.
The configuration type. Must currently be either DEVELOPMENT or DEPLOYMENT. Currently, if the configuration type is DEVELOPMENT, resources are polled for changes, component usage is checked, wicket tags are not stripped from output and a detailed exception page is used. If the type is DEPLOYMENT, component usage is not checked, wicket tags are stripped from output and a non-detailed exception page is used to display errors.
Note that you should not run Wicket in DEVELOPMENT mode on production servers - the various debugging checks and resource polling is inefficient and may leak resources, particularly on webapp redeploy.
To change the deployment mode, add the following to your web.xml, inside your
You can alternatively set this as a <context-param> on the whole context.
Another option is to set the "wicket.configuration" system property to either "deployment" or
"development". The value is not case-sensitive.
The system property is checked first, allowing you to add a web.xml param for deployment, and
a command-line override when you want to run in development mode during development.
You may also override Application.getConfigurationType() to provide your own custom switch,
in which case none of the above logic is used.
<init-param>
<param-name>configuration</param-name>
<param-value>deployment</param-value>
</init-param>
IMPORTANT NOTE
THIS METHOD IS CALLED OFTEN FROM MANY DIFFERENT POINTS IN CODE, INCLUDING DURING THE RENDER PROCESS, THEREFORE THE IMPLEMENTATION SHOULD BE FAST - PREFERRABLY USING A FAST-TO-RETRIEVE CACHED VALUE
getConfigurationType
in class WebApplication
WebApplication.getConfigurationType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |