• Post Reply Bookmark Topic Watch Topic
  • New Topic

page isErrorPage="false"  RSS feed

 
Ranch Hand
Posts: 124
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exception implicit object is available only to error pages.
you should explicitly define <%@ page isErrorPage="true" %>.

---------
SCJP, SCWCD
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really feel that you could have tried this piece of code. As far as i know it should be D)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!