This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
"Consider the source for the following two JSP pages, a.jsp and b.jsp. What i steh outcome of requesting each in turn? You can assume tha c.jsp is available in the same web app directory as a and b pages."
Options: A - neither JSP pages translate. B - a.jsp translates ; b.jsp does not. C - b.jsp translates ; a.jsp does not. D - Both pages translate. E - Neither JPP page runs successfully. F - a.jsp runs successfully; b.jsp does not G - b.jsp runs successfully; a.jsp does not H - Both pages run successfully.
Tip: oh god , sincerelly, i wouldn�t remember myself from this issue at this point, pay atention.
(is that even correct?)
SCJP | SCWCD | SCBCD | SCWSD 5 | SCEA (I) 1.4 | SCEA 5 | IBM SOA 669
"...If the page output was unbuffered and anything has been written to it, an attempt to forward the request will result in an IllegalStateException..."
so as long as you do not have any output before the <jsp:forward> the jps should compile and run OK.
Joined: Feb 18, 2005
hum..almost there Ernesto
there still is another trick issue here..
(tip: a.jsp page reagrding its content)
Joined: Feb 23, 2006
I think the only difference would it be the break-line in "a.jsp" the container may interpret the breakline as template text and send it to the outputstream in that case the <jsp:forward> becomes invalid because the stream is not buffered so it flushed. so "a.jsp" should throw and illegalstate exception. while "b.jsp" should be OK.