Programming Jakarta Struts by Chuck Cavaness The unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. 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 ?page-number?: reader question or request for clarification This page was updated July 15, 2004. UNCONFIRMED errors and comments from readers: [30] example 2-2; The result.jsp file is missing from the source.zip file in the examples download section of the web site for this book. The readme file directs the reader to this zip file. If this (and other .jsp) files are to be found elsewhere, they should be documented as such in the readme file. [89] bottom of page; Table 4-8 says that path must begin with a "/" character but the example given has a path without that character, namely, "viewsignin". So, is the example wrong, or is the statement that slash is required wrong?? [89] Table 4-8, paragraph for "path" attribute; The final sentence reads, "This attribute is required and must begin with a '/' character". The following example of a "global-forwards" element contains a child "forward" element with a path that violates this statement. [89] Table 4-8; In the row about the contextRelative attribute, "Set to true to indicate that the resource specified in the path attribute should be interpreted as application-relative if the path starts with a "/" character." should read "Set to true to indicate that the resource specified in the path attribute should be interpreted as context-relative if the path starts with a "/" character." {91} Table 4-9; In Table 4-9 under the entry for input, you claim that input is required "if the name attribute is specified"; however, your struts-config.xml file for the banking example has several entries with name but without input (e.g., /getaccountinformation). {97} The scope, input and validate tags are extraneous. It should be: [114] Example 5-4 code block; Towards the end of the processLocale method is the code: // If the Locale was never added to the session or it has changed, set it if (sessionLocale == null || (sessionLocale != requestLocale) ){ // Set the new Locale into the user's session session.setAttribute( Action.LOCALE_KEY, requestLocale ); } The test condition always evaluates to true because sessionLocale != requestLocale is always true since you are comparing reference equivalency and not object equivalency. Therefore the user's locale is being set with each request. Therefore: if (sessionLocale == null || (sessionLocale != requestLocale) ) should be changed to: if ( sessionLocale == null || (!sessionLocale.equals(requestLocale)) ) {123} 2nd paragraph; The sample struts-config.xml tag for using a ForwardAction shows the tag with two closing tags: (149) Figure 6-4; The entity relationship diagram shows the CATALOGITEM_LNK table has a primary key on the id column. This table has no id column. [151] PURCHASE ORDER DDL; The footnote claims that the DDL has been tested on Oracle 8.1.7 however the DDL creates a table with a column type of timestamp. There is no datatype timestamp in oracle and a date type should be used instead. This should probably be added to the footnote. {167} getSessionObject method; The comment // Don't create a session if one isn't already present does not match the call: HttpSession session = req.getSession(true); {200} End of 'Accessing Nested Properties' paragraph; For the setter property: property="user.address.city" the corresponding setter java methods will be: setUser().setAddress().setCity(value) {222} Code example; The Class ApplicationConfig is no longer called present, it has been renamed to ModuleConfig. The error occurs in many other places in the book. {260, 261} various locations; all references to validation-rules.xml should be validator-rules.xml Also, it appears as thogh the 1.1 DTD has been deprecated and they are reverting back to 1.0. [266] bottom of the page; The line which reads: should read: The replacement line is sourced from: http://9780596003289.apache.org/commons/dtds/validator_1_0.dtd which is what Struts 1.1 uses. {272} XML example; Opening tag is omitted (329) example 14.2 3rd taglib line; The struts tablib delivered in 9780596003289-struts-1.1-b3 is in struts-tiles.tld, not tiles.tld Hence the line should read <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> (345) end of 1st paragraph after example 14-7; READS: "... content, the sign-body.jsp file." SHOULD BE: "... content, the signin-body.jsp file." [345] 2nd paragraph; Declaring Definitions in a Configuation File We can specify definitions in a jsp page or an XML file. The error encounters when u specify defintions in XML file. Its mentioned in the book that once u specify definition in XML file, the only change u required to do in jsp page vis-a-vis specifying definitions in jsp page, is "include directive is not required". I have found out that one more change is required in the jsp file and that is : instead of it should be: