File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RequestDispatcher Q

 
Kedar Dravid
Ranch Hand
Posts: 333
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From HFSJ Ch. 5 mock exam:

When using a RequestDispatcher, the use of which methods can often lead to an IllegalStateException (Choose all that apply)

a) read
b) flush
c) write
d) getOutputStream
e) getResourceAsStream

Given answer: b
Now, according to the errata, answer c is also one of the correct answers.
My question:
How can the write method, when applied to a RequestDispatcher, result in an IllegalStateException?
 
kapil munjal
Ranch Hand
Posts: 298
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even I am interested in knowing this. I have not checked it in errata, but this is bad news, if there are other errors like this in the book.

Kapil
 
Abed Rabie
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friend,

Is this book HFSJ is free to download or I must pay for it.

Thanks and best regards

Abed
 
Pawan Ramchandani
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No soft copy available ,you have to buy this book from the market.
 
Ion Gherasim
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Both are OK. If you have a flush and then write the error is done. So b and c.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic