This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
HFSJ says, if you do flush and forward, a exception will be thrown but no one will see the exception.The client will see 'Hi all' as a response from the sample.jsp but he wont see anything as a response from other.jsp.
-----code in sample.jsp----- Hi all <%out.flush();%> <jsp:forward page="other.jsp"%>
now please see thins question -
Consider the source for the following two JSP pages, a.jsp and b.jsp. What is the outcome of requesting each in turn? You can assume that �c.jsp� is available in the same web application directory as a.jsp and b.jsp. (Choose two.)
Source for a.jsp: <%@page buffer="none" autoFlush="true"%> <jsp:forward page="c.jsp"/> Source for b.jsp: <%@page buffer="none" autoFlush="true"%><jsp:forward page="c.jsp"/> A. Neither JSP page translates. B. a.jsp translates; b.jsp does not. C. b.jsp translates; a.jsp does not. D. Both JSP pages translate. E. Neither JSP page runs successfully. F. a.jsp runs successfully; b.jsp does not. G. b.jsp runs successfully, a.jsp does not. H. Both a.jsp and b.jsp run successfully.
of course D is one of the options. keeping in mind the thing said in HFSJ, i selected H as the second option. but the another answer given is G.
what i want to say is -
is equiivalent to
so D and H are the correct answers.
SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ] Performance is a compulsion, not a option, if my existence is to be justified.