wood burning stoves 2.0*
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
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: [HFSJ 2nd Edition] chapter 5 Errata
 
Similar Threads
code for file download
Servlet -Download Jar file
Confused on IllegalStateException
Doubt in HTTPServletResponse
IllegalStateException not thrown!