Oracle 1Z0-858 Online Practice
Questions and Exam Preparation
1Z0-858 Exam Details
Exam Code
:1Z0-858
Exam Name
:Java Enterprise Edition 5 Web Component Developer Certified Professional
Certification
:Oracle Certifications
Vendor
:Oracle
Total Questions
:276 Q&As
Last Updated
:Jul 12, 2026
Oracle 1Z0-858 Online Questions &
Answers
Question 201:
For a given ServletResponse response, which two retrieve an object for writing text data? (Choose two.)
A. response.getWriter() B. response.getOutputStream() C. response.getOutputWriter() D. response.getWriter().getOutputStream() E. response.getWriter(Writer.OUTPUT_TEXT)
A. response.getWriter() B. response.getOutputStream()
Question 202:
Which statement is true about web container session management?
A. Access to session-scoped attributes is guaranteed to be thread-safe by the web container. B. To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method. C. If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client. D. The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.
C. If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.
Question 203:
Given:
3.
class MyServlet extends HttpServlet {
4.
public void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
5.
// servlet code here ...
26.
}
27.
}
If the DD contains a single security constraint associated with MyServlet and its only tags and tags are:
GET
PUT
Admin
Which four requests would be allowed by the container? (Choose four.)
A. A user whose role is Admin can perform a PUT. B. A user whose role is Admin can perform a GET. C. A user whose role is Admin can perform a POST. D. A user whose role is Member can perform a PUT. E. A user whose role is Member can perform a POST. F. A user whose role is Member can perform a GET.
A. A user whose role is Admin can perform a PUT. B. A user whose role is Admin can perform a GET. C. A user whose role is Admin can perform a POST. E. A user whose role is Member can perform a POST.
Question 204:
Which two are true concerning the objects available to developers creating tag files? (Choose two.)
A. The session object must be declared explicitly. B. The request and response objects are available implicitly. C. The output stream is available through the implicit outStream object. D. The servlet context is available through the implicit servletContext object. E. The JspContext for the tag file is available through the implicit jspContext object.
B. The request and response objects are available implicitly. E. The JspContext for the tag file is available through the implicit jspContext object.
Question 205:
Given an HttpServletRequest request and HttpServletResponse response, which sets a cookie "username" with the value "joe" in a servlet?
A. request.addCookie("username", "joe") B. request.setCookie("username", "joe") C. response.addCookie("username", "joe") D. request.addHeader(new Cookie("username", "joe")) E. request.addCookie(new Cookie("username", "joe")) F. response.addCookie(new Cookie("username", "joe")) G. response.addHeader(new Cookie("username", "joe"))
F. response.addCookie(new Cookie("username", "joe"))
Question 206:
If you want to use the Java EE platform's built-in type of authentication that uses a custom HTML page for authentication, which two statements are true? (Choose two.)
A. Your deployment descriptor will need to contain this tag:CUSTOM. B. The related custom HTML login page must be named loginPage.html. C. When you use this type of authentication, SSL is turned on automatically. D. You must have a tag in your deployment descriptor that allows you to point to both a login HTML page and an HTML page for handling any login errors. E. In the HTML related to authentication for this application, you must use predefined variable names for the variables that store the user and password values.
D. You must have a tag in your deployment descriptor that allows you to point to both a login HTML page and an HTML page for handling any login errors. E. In the HTML related to authentication for this application, you must use predefined variable names for the variables that store the user and password values.
Question 207:
You are creating a new JSP page and you need to execute some code that acts when the page is first executed, but only once. Which three are possible mechanisms for performing this initialization code? (Choose three.)
A. In the init method. B. In the jspInit method. C. In the constructor of the JSP's Java code. D. In a JSP declaration, which includes an initializer block. E. In a JSP declaration, which includes a static initializer block.
B. In the jspInit method. D. In a JSP declaration, which includes an initializer block. E. In a JSP declaration, which includes a static initializer block.
Question 208:
The Squeaky Bean company has decided to port their web application to a new J2EE 1.4 container. While reviewing the application, a developer realizes that in multiple places within the current application, nearly duplicate code exists that finds enterprise beans. Which pattern should be used to eliminate this duplicate code?
A. Transfer Object B. Front Controller C. Service Locator D. Intercepting Filter E. Business Delegate F. Model-View-Controller
C. Service Locator
Question 209:
Which interface must a class implement so that instances of the class are notified after any object is added to a session?
A. javax.servlet.http.HttpSessionListener B. javax.servlet.http.HttpSessionValueListener C. javax.servlet.http.HttpSessionBindingListener D. javax.servlet.http.HttpSessionAttributeListener
D. javax.servlet.http.HttpSessionAttributeListener
Question 210:
Given an EL function declared with:
11.
12.
spin
13.
com.example.Spinner
14.
15.
java.lang.String spinIt()
16.
17.
Which two are true? (Choose two.)
A. The function method must have the signature:public String spin(). B. The method must be mapped to the logical name "spin" in the web.xml file. C. The function method must have the signature:public String spinIt(). D. The function method must have the signaturepublic static String spin(). E. The function method must have the signature:public static String spinIt(). F. The function class must be named Spinner, and must be in the package com.example.
E. The function method must have the signature:public static String spinIt(). F. The function class must be named Spinner, and must be in the package com.example.
Nowadays, the certification exams become more and more important and required by more and more
enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare
for the exam in a short time with less efforts? How to get a ideal result and how to find the
most reliable resources? Here on Vcedump.com, you will find all the answers.
Vcedump.com provide not only Oracle exam questions,
answers and explanations but also complete assistance on your exam preparation and certification
application. If you are confused on your 1Z0-858 exam preparations
and Oracle certification application, do not hesitate to visit our
Vcedump.com to find your solutions here.