Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 12th, 2003, 08:30 PM
Registered User
Join Date: Aug 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default The complete struts applicaton in Chapter 16


I got the struts application of chapter 16 of Beginnig JSP 2.0 working by typing in all the code myself since there is nowhere I can download it. I am using Tomcat 5.0.9/j2sk1.4.2. Please pay attention to:

1. There seems to be an error/typo in booknewslist.jsp (p734), (in the <c:forEach> loop, the line <html:linkpage="/book/update.do?....">).
"/book/update.do" is not a valid path and is not defined in struts congiguration file either. sounds like should be "/book/edit.do...".

2. The struts-legacy.jar came with struts-1.1 is no good. Its GenericConnection does not support prepareStatement(String sql, int autoGeneratedKeys), and you will run into error with BookDAO and BookNewsDAO. You need to download the struts-legacy source, put the following lines in the GenericConnection.java (the version for jdk1.4):

    public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
        throws SQLException
        if (closed) throw new SQLException(SQLEXCEPTION_CLOSED);

        return (conn.prepareStatement(sql, autoGeneratedKeys));


and then compile GenericConnection.java and GenericDataSource.java, make your own struts-legacy.jar using jar and put it into WEB-INF/lib of the publish application.

3. make sure you have booknewslist.jsp in the content folder (see page748, content folder instead of contents, booknewslist.jsp is missing there).

As a JSP newcomer, I really like this sample application, the authors did a great job. I got the application working perfectly and did not see any other problems.

Good luck!

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 16 Fig 16-11 krsouthern BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 1 July 8th, 2008 12:11 PM
Chapter 16 czambran BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 April 11th, 2005 11:01 AM
Complete code for Pro Jakarta Struts amith_pj BOOK: Professional Jakarta Struts 0 March 2nd, 2005 01:56 PM
Beg. JSP 2.0 Chapter 16 - Struts web application EdgarRaul JSP Basics 2 August 13th, 2004 01:26 AM
Beg. JSP 2.0 Chapter 16 - Struts web application EdgarRaul JSP Basics 1 August 12th, 2004 02:16 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.