PrepAway - Latest Free Exam Questions & Answers

Tag: Exam 1D0-532

Exam 1D0-532: CIW WEB DEVELOPER (JCERT)

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?

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?


Page 7 of 12« First...56789...Last »