Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 12th, 2003, 08:30 PM
Registered User
 
Join Date: Aug 2003
Location: Gaithersburg, MD, .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default The complete struts applicaton in Chapter 16

Hi,

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!




Closed Thread


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 12: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



All times are GMT -4. The time now is 11:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.