Download FAQ History |  | API Search Feedback

> ## The Example JSP Pages

> This chapter illustrates JSTL with excerpts from the JSP version of the Duke's Bookstore application discussed in Chapter 16 rewritten to replace the JavaBeans component database helper object with direct calls to the database via the JSTL SQL tags. For most applications, it is better to encapsulate calls to a database in a bean. JSTL includes SQL tags for situations where a new application is being prototyped and the overhead of creating a bean may not be warranted.

> The source for the Duke's Bookstore application is located in the `<``INSTALL``>/jwstutorial12/examples/web/bookstore4/` directory created when you unzip the tutorial bundle (see About the Examples). A sample `bookstore4.war` is provided in `<``INSTALL``>/jwstutorial12/examples/web/provided-wars/`. To build, package, deploy, and run the example:

> 1. Build and package the bookstore common files as described in Updating Web Applications.
> 2. In a terminal window, go to `<``INSTALL``>/jwstutorial12/examples/web/bookstore4/`.
> 3. Run `ant` `build`. This target will spawn any necessary compilations and copy files to the `<``INSTALL``>/jwstutorial12/examples/web/bookstore4/build/` directory.
> 4. Start Tomcat.
> 5. Perform all the operations described in Updating Web Applications.
> 6. Run `ant` `install-config`. The `install-config` target notifies Tomcat that the new context is available.
> 7. Open the bookstore URL `http://localhost:8080/bookstore4/bookstore`.

> See Troubleshooting for help with diagnosing common problems.

Download FAQ History |  | API Search Feedback

All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.