File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes [HFSJ 2nd Edition] chapter 5 Errata Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "[HFSJ 2nd Edition] chapter 5 Errata" Watch "[HFSJ 2nd Edition] chapter 5 Errata" New topic
Author

[HFSJ 2nd Edition] chapter 5 Errata

Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
Page # 207


There are two problems with above code.
1) The request is forwarded after committing the response. This will result into IlligalStateException. In the book it is mentioned.
2) The other is with the line marked Erroneous. Here getResourceAsStream() method accepts string parameter. But the URL path should start with '/' i.e. it will search in and from root.
 
jQuery in Action, 2nd edition
 
subject: [HFSJ 2nd Edition] chapter 5 Errata