• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error in HFSJSP?

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Far out!!! I did not know this existed. Thank you very much!

Tim Rawerts
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic