• Post Reply Bookmark Topic Watch Topic
  • New Topic

EPractice Lab mock exam 5 , jsp:forward

 
Himai Minh
Ranch Hand
Posts: 1400
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Which of the following statement is not true about the jsp:forward action?

a. If the page output is buffered, the buffer is cleared prior to forwarding.
b. If the page output is buffered and the buffer was flushed, the buffer is reset once again before forwarding.
c. If the page output was unbuffered and anything has been written to it, an attempt to forward the request will result in an IllegalStateException.
Choice B is correct
If the page output is buffered and the buffer was flushed, an attempt to forward the request will result in an IllegalStateException.


I don't think c is always true.
If the output is committed, an attempt to forward will throw IllegalStateException. But if the output is not committed, the forward will not throw this exception.
The statement in c does not mention if the output is committed or not committed yet.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 2791
181
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The statement in c does not mention if the output is committed or not committed yet.

Unbuffered means that everything writen to the page output is immediately flushed (committed).
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!