Introduction to eStruts

Introduction to eStruts

1.1. Preface
This chapter is an introductory tutorial for new users of eStruts.

This tutorial is intended for new users of eStruts but requires Java and SQL knowledge.
1.2. Developing the web Application
1.Configure the DataSource.xml which is in eStruts-1.1 folder to Add/Edit the Database settings
2.This Product ships with a sample HSQL Database for Testing the product (eStruts/SampleDatabase folder)
3.Start the application by executing the execute.bat or execute.sh file.
4.Select a Database Driver from the list and type in the URL to connect to the database
5.Click on Connect to list all the tables
6.Select all the required tables and click on Generate to generate Struts Framework classes
1.3. Auto Generated Files
7.eStruts generates files in eStruts-1.0/StrutsApp/StrutsAppSrc folder
Business Logic classes:
Action Classes (Controller)
Form Beans, Connection and Data Access Classes (Model)
JSP pages (View)
Configuration Files:
Web Files: struts-config.xml, web.xml, AntBuild.xml
Database Query Files: connection.properties, sqlqueries.properties, tables-fields.properties
1.4. Building and Deploying the application
8.Execute buildApp.bat to build the war (Web Archive) file, by default it
generates eStruts.war file or you can specify the App name in eStruts main screen as in 1.2.
9.Deploy the war file in JBOSS or TOMCAT
For JBOSS Copy the war file in the deploy folder and for tomcat copy it in webapps folder
and start the server and execute http://localhost:8080/eStruts.
JBOSS : JBOSS_HOME/server/default/deploy/
TOMCAT: TOMCAT_HOME/webapps
1.5. Configuring the web application
10.eStruts uses the proxool database connection pool, it can be disabled by setting use_proxool=no
     in the connection.properties file in classes folder.
11.JDNI Name for the DataSource can be configured by setting the JNDI_NAME in connection.properties
1.6. SQL Queries
eStruts generates the SQL Queries for the tables selected for Auto Generation,
the queries can be modified with a criteria in sqlqueries.properties file in classes folder.
Ex: eStruts generates the query as follows
SELECT ID,FIRSTNAME,LASTNAME,STREET,CITY FROM CUSTOMER
It can be modified and a criteria can be added at the end of the table name
SELECT ID,FIRSTNAME,LASTNAME,STREET,CITY FROM CUSTOMER where FIRSTNAME like ‘%Vijay%’
Note: Please do not remove any column and also please do not change the order of the columns.