Programming Jakarta Struts by Chuck Cavaness The following corrections were made to the 11/03 reprint: Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem (74) partial web.xml file; >/action/* NOW READS: /action/* (86) Table 4-5; In the row about the dynamic attribute, the text previously read: "This has been deprecated and the framework will not determine this automatically.". NOW READS: "This has been deprecated and the framework will now determine this automatically." (88) 3rd Paragraph; "The following is an example of a global-exception element:" NOW READS: "The following is an example of a global-exceptions element:" [89] IN PRINT: className - The implementation class of the configuration bean that will hold the forward information. The default class is org.apache.struts.action. ActionForward when no value is specified. NOW READS: className - The extension class of the configuration bean that will hold the forward information. The default class is org.apache.struts.action. ForwardConfig when no value is specified. (101) 6th paragraph; A sentence fragment "You can download the Struts console" HAS BEEN DELETED from the sixth paragraph. {149-151} SQL fix error; The script to create the tables was missing a couple of semi colons. CORRECTED VERSION IS BELOW: DROP DATABASE storefront; CREATE DATABASE storefront; use storefront; CREATE TABLE CATALOG( id int NOT NULL, displaylabel varchar(50) NOT NULL, featuredcatalog char(1) NULL, description varchar(255) NULL ); ALTER TABLE CATALOG ADD CONSTRAINT PK_CATALOG PRIMARY KEY(id); CREATE TABLE CUSTOMER ( id int NOT NULL , firstname varchar(50) NOT NULL, lastname varchar(50) NOT NULL, email varchar(50) NOT NULL , password varchar(15) NOT NULL, description varchar(255) NULL, displaylabel varchar(255) NULL, creditStatus char(1) NULL, accountstatus char(1) NULL, accountnumber varchar(15) NOT NULL ); ALTER TABLE CUSTOMER ADD CONSTRAINT PK_CUSTOMER PRIMARY KEY(id); CREATE TABLE ITEM ( id int NOT NULL , itemnumber varchar (255) NOT NULL, displaylabel varchar(50) NOT NULL, description varchar (255) NULL, baseprice decimal(9,2) NOT NULL, manufacturer varchar (255) NULL, sku varchar (255) NULL, upc varchar (255) NULL, minsellingunits int NULL, sellinguom varchar (255) NULL, leadtimemin varchar (255) NULL, leadtimemax varchar (255) NULL, onhandquantity int NOT NULL, featuredesc1 varchar (255) NULL, featuredesc2 varchar (255) NULL, featuredesc3 varchar (255) NULL ); ALTER TABLE ITEM ADD CONSTRAINT PK_ITEM PRIMARY KEY(id); CREATE TABLE CATALOGITEM_LNK( catalogid int NOT NULL , itemid int NOT NULL ); ALTER TABLE CATALOGITEM_LNK ADD CONSTRAINT PK_CATALOGITEM_LNK PRIMARY KEY(catalogid, itemid); ALTER TABLE CATALOGITEM_LNK ADD CONSTRAINT FK_CATALOGITEM_LNK_CATALOG FOREIGN KEY (catalogid) REFERENCES CATALOG(id); ALTER TABLE CATALOGITEM_LNK ADD CONSTRAINT FK_CATALOGITEM_LNK_ITEM FOREIGN KEY (itemid) REFERENCES ITEM(id); CREATE TABLE PURCHASEORDER ( id int NOT NULL, customerid int NOT NULL, submitteddatetime datetime NOT NULL , status varchar (15) NULL, totalprice decimal(9,2) NOT NULL ); ALTER TABLE PURCHASEORDER ADD CONSTRAINT PK_PURCHASEORDER PRIMARY KEY(id); ALTER TABLE PURCHASEORDER ADD CONSTRAINT FK_PURCHASEORDER_CUSTOMER FOREIGN KEY (customerid) REFERENCES CUSTOMER(id); CREATE TABLE LINEITEM ( id int NOT NULL, orderid int NOT NULL, itemid int NOT NULL, lineitemnumber int NULL, unitprice decimal(9, 2) NOT NULL, baseprice decimal(9, 2) NOT NULL, quantity int NOT NULL ); ALTER TABLE LINEITEM ADD CONSTRAINT PK_LINEITEM PRIMARY KEY(id); ALTER TABLE LINEITEM ADD CONSTRAINT FK_LINEITEM_ORDER FOREIGN KEY (orderid) REFERENCES PURCHASEORDER(id); ALTER TABLE LINEITEM ADD CONSTRAINT FK_LINEITEM_ITEM FOREIGN KEY (itemid) REFERENCES ITEM(id); {163} last line of page; /* of the ServiceContext. Otherwise, a default implementation is ... NOW READS: /* of the ServletContext. Otherwise, a default implementation is ... [164] 5; in the method... public IStorefrontService createService() throws ClassNotFoundException, IllegalAccessException, InstantiationException { String className = servlet.getInitParameter( IConstants.SERVICE_CLASS_KEY ); if (className != null ){ serviceClassname = className; } return (IStorefrontService)Class.forName(className).newInstance(); } NOW READS: public IStorefrontService createService() throws ClassNotFoundException, IllegalAccessException, InstantiationException { String className = servlet.getInitParameter( IConstants.SERVICE_CLASS_KEY ); if (className != null ){ serviceClassname = className; } return (IStorefrontService)Class.forName(serviceClassName).newInstance(); } (180) 2nd Paragraph; The second line, If you are forwarding from one action to anther, ... NOW READS: If you are forwarding from one action to another, ... (212) IN PRINT: Table 8-7, 'Name' column; "INDEXED" NOW READS: "INDEXID" {275} IN PRINT: Example 11-3; Boolean result = Boolean.valueOf(value); if ( result == null ) { errors.add ( ... ); } NOW READS: if (value == null || !(value.equalsIgnoreCase("true") || value.equalsIgnoreCase("false"))) { errors.add (... ); } (432) Index There was previously an entry for logj4 All Index references for "logj4" ARE NOW LISTED under "log4j".