|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.Application
wicket.protocol.http.WebApplication
A web application is a subclass of Application which associates with an instance of WicketServlet to serve pages over the HTTP protocol. This class is intended to be subclassed by framework clients to define a web application.
Application settings are given defaults by the WebApplication() constructor, such as error page classes appropriate for HTML. WebApplication subclasses can override these values and/or modify other application settings in their respective constructors by calling getSettings() to retrieve a mutable ApplicationSettings object.
If you want to use servlet specific configuration, e.g. using init parameters
from the ServletConfigobject, you should override the
init() method. For example:
public void init()
{
String webXMLParameter = getWicketServlet()
.getInitParameter("myWebXMLParameter");
URL schedulersConfig = getWicketServlet().getServletContext()
.getResource("/WEB-INF/schedulers.xml");
...
WicketServlet,
ApplicationSettings,
ApplicationPages| Constructor Summary | |
WebApplication()
Constructor. |
|
| Method Summary | |
void |
addRedirect(javax.servlet.http.HttpServletRequest request,
java.lang.String requestUri,
BufferedResponse renderedResponse)
|
ApplicationSettings |
createApplicationSettings()
Subclasses could override this to give there own implementation of ApplicaitonSettings |
BufferedResponse |
getBufferedResponse(javax.servlet.http.HttpServletRequest request,
java.lang.String requestUri)
Returns the redirect map where the buffered render pages are stored in. |
protected ISessionFactory |
getSessionFactory()
|
WicketServlet |
getWicketServlet()
|
protected void |
init()
Initialize; if you need the wicket servlet for initialization, e.g. |
protected void |
internalInit()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected WebRequest |
newWebRequest(javax.servlet.http.HttpServletRequest servletRequest)
Create a new WebRequest. |
protected WebResponse |
newWebResponse(javax.servlet.http.HttpServletResponse servletResponse)
Create a WebResponse. |
void |
setSessionFactory(ISessionFactory sessionFactory)
|
void |
setWicketServlet(WicketServlet wicketServlet)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
| Methods inherited from class wicket.Application |
addResourceFactory, getComponentResolvers, getConverterFactory, getLocalizer, getMarkupCache, getName, getPages, getPageSets, getResourceFactory, getResourceStreamLocator, getResourceWatcher, getSettings, getSharedResources, newCrypt, newMarkupParser |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WebApplication()
| Method Detail |
public final WicketServlet getWicketServlet()
public final void setSessionFactory(ISessionFactory sessionFactory)
sessionFactory - The session factory to usepublic final void setWicketServlet(WicketServlet wicketServlet)
wicketServlet - The wicket servlet instance for this application
java.lang.IllegalStateException - If an attempt is made to call this method once the wicket
servlet has been set for the application.protected ISessionFactory getSessionFactory()
getSessionFactory in class ApplicationApplication.getSessionFactory()protected void init()
init in class Applicationprotected final void internalInit()
internalInit in class Applicationprotected WebRequest newWebRequest(javax.servlet.http.HttpServletRequest servletRequest)
servletRequest -
protected WebResponse newWebResponse(javax.servlet.http.HttpServletResponse servletResponse)
throws java.io.IOException
servletResponse -
java.io.IOException
public BufferedResponse getBufferedResponse(javax.servlet.http.HttpServletRequest request,
java.lang.String requestUri)
request - requestUri -
public void addRedirect(javax.servlet.http.HttpServletRequest request,
java.lang.String requestUri,
BufferedResponse renderedResponse)
request - requestUri - renderedResponse - public ApplicationSettings createApplicationSettings()
Application
createApplicationSettings in class ApplicationApplication.createApplicationSettings()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||