• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Warning on HF JSP + Servlets book errata. (2nd edition)

 
Yucca Nel
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A more serious mistake is found on page 849 answer to question 43. Answer A is only correct for first request that servlet deals with and could lead to some confusion into a more serious topic of sevlet lifecycle.
Hence init is only called on first request and after that the sevice() method becomes the first method or am I missing something?
Page 840 question question answer 25 (c) missing parent tag <jsp-config>

Regards Yucca
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yucca, it is generally better to post the snippet of the code or question that you are referring to as not everyone has the book with them everytime. The option A of question 43 says
[X] A: The service() method is the first method invoked by the container when a new request is received.
Explanation:the init() method is invoked first

I think the authors focused on the "new request" part which is supposed to mean the first request. But yes the language can be made more clear to avoid confusion.

As far as question 25 goes, I don't think there's anything wrong with it. The option starts from the jsp-property-group tag and this is what the question requires. The options which lists web.xml entries are not necessarily listed from the root tag. Like if you see question 23, the option C lists the init-param tag, its not necessary to wrap it in a servlet tag...
 
Yucca Nel
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anit and ty.

Sorry i will post code in future... will look into it a bit more next time.

Regards Yucca
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yucca Nel wrote:Hi Anit and ty.

Its Ankit and what's "ty" ??
 
Yucca Nel
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apologies thank you and sorry for getting name wrong...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic