public class HelloWServlet extends WServlet
This class demonstrates how to run a WComponent from a Servlet. Simply extend WServlet and implement the method getUI() to return a WComponent. In this case we return a really simple WComponent called a WLabel. Of course you could return a complex component that represents an entire web application.
To see it work, run this class (it has a main), start a browser and enter the url "http://localhost:8080/".
WServlet.WServletEnvironment, WServlet.WServletHelperAJAX_TRIGGER_PARAM_NAME, DATA_LIST_PARAM_NAME, STATIC_RESOURCE_PARAM_NAME, TARGET_ID_PARAM_NAME| Constructor and Description |
|---|
HelloWServlet() |
| Modifier and Type | Method and Description |
|---|---|
WComponent |
getUI(Object httpServletRequest) |
static void |
main(String[] args)
This main method exists to make it easy to run this servlet without having to create a web.xml file, build a war
and deploy it.
|
addGenericHeaders, createInterceptorChain, createServletHelper, handleError, init, service, serviceIntdoDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic WComponent getUI(Object httpServletRequest)
Copyright © 2016. All rights reserved.