aspose file tools*
The moose likes JSP and the fly likes 2 new questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "2 new questions" Watch "2 new questions" New topic
Author

2 new questions

aarti savant
Greenhorn

Joined: Oct 27, 2003
Posts: 11
<%@ page isErrorPage="false" %>
<%@ page errorPage="error1.jsp" %>
<HEAD>
<%@ page import="myclasses.*" %>
<jsp:useBean id="theo" scope="page" class="TT" />
<% try {
theo.computeTitle("hello");
} catch(Exception e) {
throw e;
} %>
<% String title=theo.getTitle(); %>
<TITLE><%= title %></TITLE>
</HEAD>
What is the output to the browser from the code above if the method "computeTitle()" in class TT throws a java.lang.NullPointerException?
A blank screen is sent to the browser.
No title will be shown.
The title will be java.lang.NullPointerException.
Only the output of error1.jsp.
The Title will be "null" plus the contents of error1.jsp
The memory footprint of a JSP page can be measured by serializing the generated JSP Servlet to disk and seeing how large that file is. Which one of the following statements about the above approach is TRUE?
This approach is too slow to perform on a live system.
The measurement is not accurate.
JSP pages do not have access to the Server's hard drive.
Serialization will not take into account objects referenced by the JSP page in all cases.
JSP pages cannot serialize JSP Servlets.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Firstly, please don't post the same question in multiple forums. Most of us visit many forums and you're question will be found eventually. Posting the same question in multiple forums just creates duplicate conversations and wastes the time of the people trying to help you. I'm going to request for the duplicates to be closed.
Secondly, we're big on learning 'round these parts, so the typical response to a question like this is: What do you think?
lolade Akinbowale
Greenhorn

Joined: Oct 29, 2003
Posts: 1
sorry i dont know the problem ,am having the same problem why dont u ask ur
mentor
Sathya Sankar
Ranch Hand

Joined: Sep 16, 2000
Posts: 67
Hi aarti,
What is the output to the browser from the code above if the method "computeTitle()" in class TT throws a java.lang.NullPointerException?
A blank screen is sent to the browser.
No title will be shown.
The title will be java.lang.NullPointerException.
Only the output of error1.jsp.
The Title will be "null" plus the contents of error1.jsp

Ans: Only the output of error1.jsp.
The memory footprint of a JSP page can be measured by serializing the generated JSP Servlet to disk and seeing how large that file is. Which one of the following statements about the above approach is TRUE?
This approach is too slow to perform on a live system.
The measurement is not accurate.
JSP pages do not have access to the Server's hard drive.
Serialization will not take into account objects referenced by the JSP page in all cases.
JSP pages cannot serialize JSP Servlets.

Ans: The measurement is not accurate. AND Serialization will not take into account objects referenced by the JSP page in all cases.
Ciao,
GSS


SCJP, SCJD, SCWCD 1.3, SCWCD 1.4, SCBCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 2 new questions