• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EPractice Lab mock exam 5 , jsp:forward

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
machines help you to do more, but experience less. Experience this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic