In this sample server-side application we have created an application which contains the window from where the user can input a text and this value would be shown into the content pane when user will click on the "Ok" button.
For creating this sample application we have created two java files InputTextServlet.java and InputTextApp.java. InputTextApp class extends an abstract class ApplicationInstance and represents the state of user interface. Each and every user who will invoke the application would contain its own unique instance. The init() method is used to initialize the state of the user interface for a new user. It should return an Window object representing the state of the initial window of an application. InputTextServlet extends the WebContainerServlet and it is responsible for invoking a new application instance which will return a new application instance for the InputTextApp.
To run this sample application create and save InputTextServlet.java and InputTextApp.java and compile them. Place these class files into the /WEB-INF/classes folder.
Do the servlet entry and servlet mapping into the deployment descriptor web.xml .
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
<display-name>Interactive Test Application</display-name>
An interactive application to test features of the Echo Platform.
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial