I've adapted to Struts the first JDBC example from Core Servlets and
JavaServer Pages by Marty Hall < http://coreservlets.com/ >. 

There's a ZIP available for download at <
http://husted.com/about/struts/ >.

Comments are of course welcome. The Struts treatment is only meant to
be as robust as Hall's original example (see http://coreservlets.com -
chapter 18).

I'd be interested in any experience anyone has had with getting more of
the business logic out of the Struts Actions. 

In a relational DBMS application, most of the real business logic is
expressed in the SQL statements, and so it might be enough to just
store the SQL statements in a seperate resource could be used by
another (non-Web) application. Thoughts?

fruits readme
=============

This is a simple Struts adaption of the first JDBC example from Core
Servlets 
and JavaServer Pages by Marty Hall < http://coreservlets.com/ >. 

Prequesites are a Servlet/JSP container, like Tomcat 3.2 and MySQL. 

To start, enter
http://localhost:8080/coreservlets-jdbc/fruitCreation.do

This should create a test table in your MySQL installation, and then
retrieve 
and display a sample report.

See WEB-INF/struts-config.xml for more about setting up MySQL. You can
also 
configure for another JDBC from here.

Java 2 binaries (JDK 1.2.2) are included, along with a sample build.xml
for Ant.

(See jakarta.apache.org for more about Ant.)

The build file is setup to copy the class files to the webapps folder,
so you 
may need to edit the path for it to work with your installation. 

To build, you will also need j2ee.jar in your classpath. You can get
this from 
the jd2sdkee.

This is setup as a ZIP file that you can extract to your webapps folder
for now. 
WAR to follow.

-- Ted Husted, 2000-DEC-27 < [EMAIL PROTECTED] >.


Reply via email to