Forums Register Login

jsp:forward

+Pie Number of slices to send: Send
Hi folks,could you please help me with this question?

i marked the option "5". is that correct?

Tks.

Given that the JspWriter's buffer will NOT be flushed until the end of the JSP page has been reached, where does the above code appear within a JSP document?

Choice 1 - Before any directives
Choice 2 - Anywhere within the document
Choice 3 - Only on the very first line of the document
Choice 4 - Before any declarations
Choice 5 - Only before any scriptlets that write output to the response object

Tks.
+Pie Number of slices to send: Send
I think you forgot to give us the "above code" to analyse...
+Pie Number of slices to send: Send
Hi Gabb, yes. Tks.

But it�s about "<jsp:forward... />"

tks.
+Pie Number of slices to send: Send
anyone else? tks.
+Pie Number of slices to send: Send
Hi,

What is the answer given. My answer is 2. As the response is not commited (buffer is not flushed) anywhere in the page the forward action occurs, the response is cleared and the forward action is invoked.

Thanks
+Pie Number of slices to send: Send
hi ,
According to me the 2 option shuld be the correct one .
Whenever forwad happens the buffer is cleared and response object stats anew for the forwared jsp.
Writing to the response is not prohibited before calling jsp:forward as this will not commit resonse to the client(flush does commit the response )
So u could use jsp:forward anywhere before commiting the response(in this case flushing the outputstream does commit the response)

Regards
-santosh
Listen. That's my theme music. That's how I know I'm a super hero. That, and this tiny ad told me:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 514 times.
Similar Threads
in-process Servlet
someone can tell me about cte?
Different Server communications
a swith/case question
Why this satement is true? "A static method may be called without creating an instan"
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:05:37.