Which of the following would be most appropriate to output the current date to a browser from a JSP?
Which of the following would be most appropriate to output the current date to a browser from a
JSP?
Which default document information can be set through a META element?
Which default document information can be set through a META element?
Which of the following are features of EJB home interfaces?
Which of the following are features of EJB home interfaces?
identify the three lines that need to be changed to allow for proper translation\compilation\display of the JS
The following excerpt from a JSP is meant to display the following output:
The price without tax is: 100.0
The tax rate is: 0.15
The tax on your purchase is: 15.0
The total cost is: 115.0
Using only the line numbers outlined in the JSP excerpt, identify the three lines that need to be
changed to allow for proper translation\compilation\display of the JSP. (Select three answers.)
The JSP excerpt with the errors is:
<html>
<body>
1 <%! public double calculateTax(double price)
{return price * taxRate;}%>
2 <% double taxRate = 0.15;%>
3 <% public double calculateTotal(double price, double tax)
{return price + tax;}%>
4 <% double price = 100.00; %>
5 The price without tax is: <%= price %> <br>
6 The tax rate is: <%= taxRate %> <br>
7 The tax on your purchase is: <% calculateTax(price); %> <br>
The total cost is: <%= calculateTotal(price, calculateTax(price))%> <br>
</body>
</html>
Which of the following allows the JSP to retrieve the JavaBean that the servlet stored in the ServletContext?
A servlet instantiates a JavaBean and stores it in the ServletContext object using the following
code:
com.mybean.Employee worker = new com.mybean.Employee();
servletContext.setAttribute(“employee”, worker);
The servlet then returns a response to the client, which subsequently makes another request to a
JSP in the same Web application as the original servlet. Which of the following allows the JSP to
retrieve the JavaBean that the servlet stored in the ServletContext?
Which method is NOT supported by the JMS 1.1 and the J2EE 1.3 specifications?
An application that is a JMS consumer may process JMS messages in three of the four following
ways. Which method is NOT supported by the JMS 1.1 and the J2EE 1.3 specifications?
which interface can these servlets access a DataSource’s JNDI name that has been configured as an applic
A Web application has been deployed with three servlets in it. Through which interface can these
servlets access a DataSource’s JNDI name that has been configured as an application-wide
initialization parameter?
which specification?
The service directly used to publicly locate and identify the Web Services offered on a server
would implement which specification?
what URL (and associated query string) will the browser attempt to access?
Given the following HTML form on a Web page:
<FORM ACTION=”http://localhost:7001/phoneBook” METHOD=”GET”>
<H1>Phone Book</H1>
<CENTER>
<p>
Last Name: <INPUT TYPE=”TEXT” NAME=”last” SIZE=”25″ VALUE=”Smith”><p>
First Name: <INPUT TYPE=”TEXT” NAME=”first” SIZE=”25″ VALUE=”John”><p>
Phone Number: <INPUT TYPE=”TEXT” NAME=”phone” SIZE=”17″ VALUE=”4567890″><p>
<p><INPUT TYPE=”SUBMIT”>
</CENTER>
</FORM>
If the user who is presented with this form simply clicks the Submit button without updating any
fields, what URL (and associated query string) will the browser attempt to access?
What JSP directive should appear at the top of main.jsp in order to enable this functionality?
A Web application is made up of two JSP files (main.jsp and error.jsp). Any exceptions thrown
within main.jsp should be automatically handled by error.jsp. What JSP directive should appear at
the top of main.jsp in order to enable this functionality?