Table is a way to present data into the tabular format. You can also create tables in Echo3 by using the class Table, provided in the nextapp.echo.app package. There are four constructors provided for creating a table in Echo3 as given below:
In this example of creating Table in Echo3 we have created a simple application into which the Table with the DefaultTableModel will be added to the window pane when the user clicks on the button "Add Table".
TableServlet.java
package table;
|
TableApp.java
package table;
|
One more important thing to do is the mapping of TableServlet in the deployment descriptor web.xml as given below:
| <!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> <servlet> <servlet-name>TableServlet</servlet-name> <servlet-class>table.TableServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>TableServlet</servlet-name> <url-pattern>/app/table</url-pattern> </servlet-mapping> </web-app> |
To run this application download source code and deploy it into the Web Server (e.g Tomcat Server) and type the following URL into the address bar as http://localhost:8080/echo3/app/table

Click on "Add Table" button.

|
Recommend the tutorial |
Ask Questions? Discuss: Creating Table in Echo3
Post your Comment