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
    :Mar 31, 2025

Oracle Oracle Certifications 1Z0-858 Questions & Answers

  • Question 11:

    Given that a web application consists of two HttpServlet classes, ServletA and ServletB, and the ServletA.service method:

    20.

    String key = "com.example.data";

    21.

    session.setAttribute(key, "Hello");

    22.

    Object value = session.getAttribute(key);

    23.

    Assume session is an HttpSession, and is not referenced anywhere else in ServletA.

    Which two changes, taken together, ensure that value is equal to "Hello" on line 23? (Choose two.)

    A. ensure that the ServletB.service method is synchronized

    B. ensure that the ServletA.service method is synchronized

    C. ensure that ServletB synchronizes on the session object when setting session attributes

    D. enclose lines 21-22 in a synchronized block:synchronized(this) {session.setAttribute(key, "Hello");value = session.getAttribute(key);}

    E. enclose lines 21-22 in a synchronized block:synchronized(session) {session.setAttribute(key, "Hello");value = session.getAttribute(key);}

  • Question 12:

    Which retrieves all cookies sent in a given HttpServletRequest request?

    A. request.getCookies()

    B. request.getAttributes()

    C. request.getSession().getCookies()

    D. request.getSession().getAttributes()

  • Question 13:

    Your company has a corporate policy that prohibits storing a customer's credit card number in any corporate database. However, users have complained that they do NOT want to re-enter their credit card number for each transaction. Your management has decided to use client-side cookies to record the user's credit card number for 120 days. Furthermore, they also want to protect this information during transit from the web browser to the web container; so the cookie must only be transmitted over HTTPS. Which code snippet creates the "creditCard" cookie and adds it to the out going response to be stored on the user's web browser?

    A. 10. Cookie c = new Cookie("creditCard", usersCard);11. c.setSecure(true);12.

    B. setAge(10368000);13. response.addCookie(c);

    C. 10. Cookie c = new Cookie("creditCard", usersCard);11. c.setHttps(true);12.

    D. setMaxAge(10368000);13. response.setCookie(c);

    E. 10. Cookie c = new Cookie("creditCard", usersCard);11. c.setSecure(true);12.

    F. setMaxAge(10368000);13. response.addCookie(c);

    G. 10. Cookie c = new Cookie("creditCard", usersCard);11. c.setHttps(true);12.

    H. setAge(10368000);13. response.addCookie(c);

    I. 10. Cookie c = new Cookie("creditCard", usersCard);11. c.setSecure(true);12.

    J. setAge(10368000);13. response.setCookie(c);

  • Question 14:

    A web browser need NOT always perform a complete request for a particular page that it suspects might NOT have changed. The HTTP specification provides a mechanism for the browser to retrieve only a partial response from the web server; this response includes information, such as the Last- Modified date but NOT the body of the page. Which HTTP method will the browser use to retrieve such a partial response?

    A. GET

    B. ASK

    C. SEND

    D. HEAD

    E. TRACE

    F. OPTIONS

  • Question 15:

    Which ensures that a JSP response is of type "text/plain"?

    A. <%@ page mimeType="text/plain" %>

    B. <%@ page contentType="text/plain" %>

    C. <%@ page pageEncoding="text/plain" %>

    D. <%@ page contentEncoding="text/plain" %>

    E. <% response.setEncoding("text/plain"); %>

    F. <% response.setMimeType("text/plain"); %>

  • Question 16:

    Your web application uses a simple architecture in which servlets handle requests and then forward to a JSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation. This information must NOT be accessible to any other servlet, JSP or session in the webapp. Which two techniques can you use to accomplish this goal? (Choose two.)

    A. Add attributes to the session object.

    B. Add attributes on the request object.

    C. Add parameters to the request object.

    D. Use the pageContext object to add request attributes.

    E. Add parameters to the JSP's URL when generating the request dispatcher.

  • Question 17:

    All of your JSPs need to have a link that permits users to email the web master. This web application is licensed to many small businesses, each of which have a different email address for the web master. You have decided to use a context parameter that you specify in the deployment descriptor, like this:

    42.

    43.

    webmasterEmail

    44.

    [email protected]

    45.

    Which JSP code snippet creates this email link?

    A. contact us

    B. contact us

    C. contact us

    D. contact us

  • Question 18:

    In a JSP-centric web application, you need to create a catalog browsing JSP page. The catalog is stored as a List object in the catalog attribute of the webapp's ServletContext object. Which scriptlet code snippet gives you access to the catalog object?

    A. <% List catalog = config.getAttribute("catalog"); %>

    B. <% List catalog = context.getAttribute("catalog"); %>

    C. <% List catalog = application.getAttribute("catalog"); %>

    D. <% List catalog = servletContext.getAttribute("catalog"); %>

  • Question 19:

    You are building your own layout mechanism by including dynamic content for the page's header and footer sections. The footer is always static, but the header generates the tag that requires the page name to be specified dynamically when the header is imported. Which JSP code snippet performs the import of the header content? </p><p>A. <jsp:include page='/WEB-INF/jsp/header.jsp'><jsp:param name='pageName' value='Welcome Page' / ></jsp:include> </p><p>B. <jsp:import page='/WEB-INF/jsp/header.jsp'><jsp:param name='pageName' value='Welcome Page' / ></jsp:import> </p><p>C. <jsp:include page='/WEB-INF/jsp/header.jsp'><jsp:attribute name='pageName' value='Welcome Page' /></jsp:include> </p><p>D. <jsp:import page='/WEB-INF/jsp/header.jsp'><jsp:attribute name='pageName' value='Welcome Page' / ></jsp:import> </p></p> <div class="answer" id="answer2797164" style="display: none"><p>Correct Answer: A </p></div> <div class="button"> <input type="button" class="btn btn-primary answer-btn" value="SHOW ANSWERS" data-id="2797164"> </div> </li> <li> <h4>Question 20: </h4> <p><p>Which is a benefit of precompiling a JSP page? </p><p>A. It avoids initialization on the first request. </p><p>B. It provides the ability to debug runtime errors in the application. </p><p>C. It provides better performance on the first request for the JSP page. </p><p>D. It avoids execution of the _jspService method on the first request. </p></p> <div class="answer" id="answer2797161" style="display: none"><p>Correct Answer: C </p></div> <div class="button"> <input type="button" class="btn btn-primary answer-btn" value="SHOW ANSWERS" data-id="2797161"> </div> </li> </ul> </div> </div><!-- work-history --> <div class="text-center"><ul class="pagination "><li><a href="/exam/1Z0-858.html" rel="nofollow"><i class="fa fa-chevron-left"></i></a></li><li><a href="/exam/1Z0-858.html" rel="nofollow">1</a></li><li class="active"><a href="#">2</a></li><li><a href="/exam/1Z0-858.html?page=3" rel="nofollow">3</a></li><li><a href="/exam/1Z0-858.html?page=4" rel="nofollow">4</a></li><li><a href="/exam/1Z0-858.html?page=5" rel="nofollow">5</a></li><li class="dian"><a>...</a></li><li><a href="/exam/1Z0-858.html?page=27" rel="nofollow">27</a></li><li><a href="/exam/1Z0-858.html?page=28" rel="nofollow">28</a></li><li><a href="/exam/1Z0-858.html?page=3" rel="nofollow"><i class="fa fa-chevron-right"></i></a></li></ul></div> <div class="special-qualification: section"> <div class="icons"> <i class="fa fa-thumbs-o-up" aria-hidden="true"></i> </div> <div class="personal-info"> <h3>Related Exams:</h3> <ul class="address"> <li><h5><a href="https://www.vcedump.com/1z0-020.html">1Z0-020</a></h5> <a href="https://www.vcedump.com/1z0-020.html" style="color: #2d3038">Oracle8i: New Features for Administrators</a></li> <li><h5><a href="https://www.vcedump.com/1z0-023.html">1Z0-023</a></h5> <a href="https://www.vcedump.com/1z0-023.html" style="color: #2d3038">Architecture and Administration</a></li> <li><h5><a href="https://www.vcedump.com/1z0-024.html">1Z0-024</a></h5> <a href="https://www.vcedump.com/1z0-024.html" style="color: #2d3038">Performance Tuning</a></li> <li><h5><a href="https://www.vcedump.com/1z0-025.html">1Z0-025</a></h5> <a href="https://www.vcedump.com/1z0-025.html" style="color: #2d3038">Backup and Recovery</a></li> <li><h5><a href="https://www.vcedump.com/1z0-026.html">1Z0-026</a></h5> <a href="https://www.vcedump.com/1z0-026.html" style="color: #2d3038">Network Administration</a></li> <li><h5><a href="https://www.vcedump.com/1z0-034.html">1Z0-034</a></h5> <a href="https://www.vcedump.com/1z0-034.html" style="color: #2d3038">Upgrade Oracle9i/10g OCA to Oracle Database OCP</a></li> <li><h5><a href="https://www.vcedump.com/1z0-036.html">1Z0-036</a></h5> <a href="https://www.vcedump.com/1z0-036.html" style="color: #2d3038">Managing Oracle9i on Linux</a></li> <li><h5><a href="https://www.vcedump.com/1z0-041.html">1Z0-041</a></h5> <a href="https://www.vcedump.com/1z0-041.html" style="color: #2d3038">Oracle Database 10g: DBA Assessment</a></li> <li><h5><a href="https://www.vcedump.com/1z0-052.html">1Z0-052</a></h5> <a href="https://www.vcedump.com/1z0-052.html" style="color: #2d3038">Oracle Database 11g: Administration Workshop I</a></li> <li><h5><a href="https://www.vcedump.com/1z0-053.html">1Z0-053</a></h5> <a href="https://www.vcedump.com/1z0-053.html" style="color: #2d3038">Oracle Database 11g: Administration II</a></li> </ul> </div> </div><!-- educational-background --> <div class="declaration section"> <div class="icons"> <i class="fa fa-hand-peace-o" aria-hidden="true"></i> </div> <div class="declaration-info"> <h3>Tips on How to Prepare for the Exams</h3> <p>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. </p> </div> </div><!-- career-objective --> </div><!-- resume-content --> </div><!-- container --> </section><!-- ad-profile-page --> <script type="text/javascript" src="/js/UAAAAAOCOyHhADO0j.js"></script> <footer id="footer" class="clearfix"> <!-- footer-top --> <!--section class="footer-top clearfix"> <div class="container"> <div class="row"> <!-- footer-widget --> <!--div class="col-sm-3"> <div class="footer-widget"> <h3>Quik Links</h3> <ul> <li><a href="/about-us.html">About Us</a></li> <li><a href="#">Contact Us</a></li> <li><a href="#">Careers</a></li> <li><a href="#">All Cities</a></li> <li><a href="#">Help & Support</a></li> <li><a href="#">Advertise With Us</a></li> </ul> </div> </div--><!-- footer-widget --> <!-- footer-widget --> <!--div class="col-sm-3"> <div class="footer-widget"> <h3>How to sell fast</h3> <ul> <li><a href="#">How to sell fast</a></li> <li><a href="#">Membership</a></li> <li><a href="#">Banner Advertising</a></li> <li><a href="#">Promote your ad</a></li> <li><a href="#">Jobs Delivers</a></li> <li><a href="#">FAQ</a></li> </ul> </div> </div><!-- footer-widget --> <!-- footer-widget --> <!--div class="col-sm-3"> <div class="footer-widget social-widget"> <h3>Follow us on</h3> <ul> <li><a href="#"><i class="fa fa-facebook-official"></i>Facebook</a></li> <li><a href="#"><i class="fa fa-twitter-square"></i>Twitter</a></li> <li><a href="#"><i class="fa fa-google-plus-square"></i>Google+</a></li> <li><a href="#"><i class="fa fa-youtube-play"></i>youtube</a></li> </ul> </div> </div><!-- footer-widget --> <!-- footer-widget --> <!--div class="col-sm-3"> <div class="footer-widget news-letter"> <h3>Newsletter</h3> <p>Jobs is Worldest leading Portal platform that brings!</p> <!-- form --> <!--form action="/newsletter/add" method="post"> <input type="email" class="form-control" placeholder="Your email id" name="email"> <button type="submit" class="btn btn-primary">Sign Up</button> </form><!-- form --> <!--/div> </div><!-- footer-widget --> <!--/div><!-- row --> <!--/div><!-- container --> <!--/section><!-- footer-top --> <div class="footer-bottom clearfix text-center"> <div class="container"> <p>Copyright © <a href="/">VCEDUMP.COM</a> 2025</p> </div> </div><!-- footer-bottom --> </footer><!-- footer --> <!-- JS --> <script src="/js/bootstrap.min.js"></script> <script src="/js/price-range.js"></script> <script src="/js/main.js"></script> <script src="/js/switcher.js"></script> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-MD8L8FYY2G"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-MD8L8FYY2G'); </script> </body> </html><script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="1f64e7f2c99f8be9f2ac9dfe-|49" defer></script><script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script>