wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes  page isErrorPage= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark " page isErrorPage="false" " Watch " page isErrorPage="false" " New topic
Author

page isErrorPage="false"

Surajsingh Thakur
Ranch Hand

Joined: Sep 09, 2008
Posts: 124

Given the following piece of code in common_error.jsp,
<%@ page isErrorPage="false" %>
<html>
<body>
Fatal Error <b><%=exception.getMessage()%></b>
</body>
</html>

What will happen when the Container tries to redirects to a JSP Page after
encountering some error in 'common_error.jsp'?
a. The message 'Fatal Error' along with the description of the exception message will
be displayed.
b. NullPointerException will be encountered in 'common_error.jsp'.
c. The result is unpredictable.
d. None of the above.

What will be the output??

Also in a JSP page if an impicit variable is not accessible or available and it is used in the code then what will happen...Thank you


BE (Computer Science) SCJP 4 (80%) SCWCD 5 (97%) IBM CAD(98%) IBM CAppD(100%) IBM SD(100%)
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by Surajsingh Thakur:
Also in a JSP page if an impicit variable is not accessible or available and it is used in the code then what will happen


translation error occur. so, in this case correct option is D)none of the above

Hope this helps
Lakmal Abeysekara
Greenhorn

Joined: Oct 14, 2008
Posts: 9
The exception implicit object is available only to error pages.
You should explicitly define <%@ page isErrorPage="true" %>.

---------
SCJP, SCWCD
Lakshmi Narayanan
Ranch Hand

Joined: Apr 29, 2008
Posts: 58
I really feel that you could have tried this piece of code. As far as i know it should be D)


Thanks<br />Lakshmi<br />SCJP 1.4 - 90%<br />SCWCD 5 - 89%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: page isErrorPage="false"
 
Similar Threads
problem with errorPage and isErrorPage="true"
Error Handling in JSP
Confused regarding isErrorPage
Tomcat does not find my custom method
exception implicit object doubt