Oracle Java Enterprise Edition 5 Web Component Developer Certified Professional Sample Questions:
1. Given:
10.
public void service(ServletRequest request,
11.
ServletResponse response) {
12.
ServletInputStream sis =
13.
// insert code here
14.
}
Which retrieves the binary input stream on line 13?
A) request.getInputStream();
B) request.getWriter();
C) request.getResourceAsStream();
D) request.getResourceAsStream(ServletRequest.REQUEST);
E) request.getReader();
2. Your management has required that all JSPs be created to generate XHTML-compliant content and to facilitate that decision, you are required to create all JSPs using the JSP Document format. In the reviewOrder.jspx page, you need to use several core JSTL tags to process the collection of order items in the customer's shopping cart. Which JSP code snippets must you use in the reviewOrder.jspx page?
A) <html xmlns:jsp="http://java.sun.com/JSP/Page"
version="2.0">
<jsp:directive.taglib prefix="c"
uri="http://java.sun.com/jsp/jstl/core" />
<!-- page content -->
</html>
B) <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
version="2.0"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<!-- page content -->
</jsp:root>
C) <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
version="2.0">
<jsp:directive.taglib prefix="c"
uri="http://java.sun.com/jsp/jstl/core" />
<!-- page content -->
</jsp:root>
D) <html xmlns:jsp="http://java.sun.com/JSP/Page"
version="2.0"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<!-- page content -->
</html>
3. Your web page includes a Java SE v1.5 applet with the following declaration:
11.
<object classid='clsid:CAFEEFAC-0015-0000-0000-ABCDEFFEDCBA'
12.
width='200' height='200'>
13.
<param name='code' value='Applet.class' />
14.
</object>
Which HTTP method is used to retrieve the applet code?
A) RETRIEVE
B) POST
C) GET
D) PUT
4. You have a use case in your web application that adds several session-scoped attributes. At the end of the use case, one of these objects, the manager attribute, is removed and then it needs to decide which of the other session-scoped attributes to remove.
How can this goal be accomplished?
A) The object of the manager attribute should implement the HttpSessionListener and it should call the deleteAttribute method on the appropriate session attributes.
B) The object of the manager attribute should implement the HttpSessionListener and it should call the removeAttribute method on the appropriate session attributes.
C) The object of the manager attribute should implement the HttpSessionBindingListener and it should call the deleteAttribute method on the appropriate session attributes.
D) The object of the manager attribute should implement the HttpSessionBindingListener and it should call the removeAttribute method on the appropriate session attributes.
5. Your web application views all have the same header, which includes the <title> tag in the <head> element of the rendered HTML. You have decided to remove this redundant HTML code from your JSPs and put it into a single JSP called /WEB-INF/jsp/header.jsp. However, the title of each page is unique, so you have decided to use a variable called pageTitle to parameterize this in the header JSP, like this:
10. <title>${param.pageTitle}<title>
Which JSP code snippet should you use in your main view JSPs to insert the header and pass the pageTitle variable?
A) <jsp:include page='/WEB-INF/jsp/header.jsp'> <jsp:param name='pageTitle' value='Welcome Page' /> </jsp:include>
B) <jsp:insert page='/WEB-INF/jsp/header.jsp'>
${pageTitle='Welcome Page'}
</jsp:insert>
C) <jsp:insert page='/WEB-INF/jsp/header.jsp'>
<jsp:param name='pageTitle' value='Welcome Page' />
</jsp:insert>
D) <jsp:include page='/WEB-INF/jsp/header.jsp'>
${pageTitle='Welcome Page'}
</jsp:include>
E) <jsp:include file='/WEB-INF/jsp/header.jsp'>
${pageTitle='Welcome Page'}
</jsp:include>
Solutions:
| Question # 1 Answer: A | Question # 2 Answer: B | Question # 3 Answer: C | Question # 4 Answer: D | Question # 5 Answer: A |














1090 Customer Reviews
Quality and ValueITCertKing Practice Exams are written to the highest standards of technical accuracy, using only certified subject matter experts and published authors for development - no all study materials.
Tested and ApprovedWe are committed to the process of vendor and third party approvals. We believe professionals and executives alike deserve the confidence of quality coverage these authorizations provide.
Easy to PassIf you prepare for the exams using our ITCertKing testing engine, It is easy to succeed for all certifications in the first attempt. You don't have to deal with all dumps or any free torrent / rapidshare all stuff.
Try Before BuyITCertKing offers free demo of each product. You can check out the interface, question quality and usability of our practice exams before you decide to buy.
