Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in HFSJSP?

 
Tim Rawerts
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am still having problems getting the chapter three example to work, so I deleted it all and started over. I know this may be silly, but I since I can't get this to work I don't want to take anything for granted.

Page 77, under Create the DD in your Development environment. It says to "create this XML document, name it web.xml, and save it in your DEPLOYMENT environment under the /beerV1/etc directory.

I am assuming for several reasons that this should have been DEVELOPMENT instead. Number two at the bottom of the page tells me to "place a copy of web.xml file into tomcat/webapps/Beer-v1/WEB-INF/.

Anyway I am going forward on this assumption, and will check back later to see if anyone has any information.

The head is starting to get sore........

Thanks,
Tim Rawerts
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,

to be sure get the HFSJ errata list from O'Reilly web site and check first all the pages that fell into chapter 3 or look below:


Chapter 3 realted excerpt from HFSJ errata list:

(77) 2rd paragraph;
and save it in your deployment environment under ....
should be
and save it in your development environment under ....


(78) handwritten comment;
...to the URL of the page its on.
should be:
...to the URL of the page it's on.


{82} 2nd paragraph;
- Its directory structure should be /WEB-INF/classes/com/model
should have been
- Its directory structure should be /WEB-INF/classes/com/example/model


{84} Addition of new code ;
The code for servlet version three on page 89 shows the following line as commented
out:
// out.println("<br>Got beer color " + c);

However, that line never appeared in the servlet version two code and should be added
(uncommented out and in bold) just above the following line on page 84:
BeerExpert be = new BeerExpert();

AUTHOR:
This is how I would reorganize these two code examples in a
future printing of the book.

First, on pg 84 move all of the code that (a) retrieves the
'color' parameter and (b) retrieve the results of the beer
search from the BeerExpert to the top of the doPost method.
Put the code to (a) set content type, (b) retrieve the Writer,
and (c) generate the response at the bottom of the doPost
method.

Second, on pg 89, reproduce the code structure from above,
but now comment out the bottom half which is being replaced
by the code to (a) set the 'styles' attribute, (b) create the
RequestDispatcher, and (c) forward to the view ReqDisp.


(90) first sentence following "Deploying and testing the web app";
"redploy"
should be:
"redeploy"


(90) Last picture at bottom of page;
try: Jack's Pale Ale
should read:
try: Jail Pale Ale
 
Tim Rawerts
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Far out!!! I did not know this existed. Thank you very much!

Tim Rawerts
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic