Hello World in Echo3 framework
Since "Hello World" example is everyone's favorite
example therefore we will start our tutorial of Echo3/Echo Web Framework with
the "Hello World" example in Echo3. We have illustrated the first
"Hello World" example in Echo3 with the server-side API. To create the
first application you will need jar files of the Echo3. You can download Echo3
jar files from the following link:
http://echo.nextapp.com/site/echo3/download
In this example we have created two java files HelloWorldApp.java and HelloWorldServlet.java. HelloWorldApp represents the user instance of the the application and the HelloWorldServlet prcoess the HTTP connection and instantiate the HelloWorldApp application.
HelloWorldServlet.java
package helloworld;
|
HelloWorldApp.java
package helloworld;
|
One more thing you have to do before executing the application is that do the servlet mapping and servlet entry in the deployment descriptor web.xml.
web.xml
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>Interactive Test Application</display-name> <description> An interactive application to test features of the Echo Platform. </description> <servlet> </web-app> |
To run this example follow these steps as given below:
- Download Echo3 jar files
- Place these jar files into the lib /WEB-INF/lib folder
- Create java files, compile them and place into the /WEB-INF/classes folder
- Create and save web.xml file
- Start your web server (e.g Tomcat Server)
- Type the URL into the address bar http://localhost:8080/echo3/app
Output