1Z0-899 Exam Details

  • Exam Code
    :1Z0-899
  • Exam Name
    :Java EE 6 Web Component Developer Certified Expert
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :108 Q&As
  • Last Updated
    :Dec 07, 2021

Oracle 1Z0-899 Online Questions & Answers

  • Question 91:

    Given the JavaBean class:

    public class MyBean {

    private Boolean roasted = false;

    public MyBean () {}

    public Boolean isRoasted () { returned roasted }

    public void setRoasted (Boolean roasted) { this.roasted = roasted; ] }

    Assume a controller has created an instance of this bean, called setRoasted (true), and inserted the bean into the application scope using the name "myBean".

    A JSP contains these two tags:

    Which is true?

    A. the page will include the output false
    B. the page will include the output
    C. the page will report that the property roasted does not exist
    D. the page will report that the syntax of the useBean tag is incorrect
    E. the page will report that the syntax of the getProperty tag ls incorrect

  • Question 92:

    You are building a web application with a scheduling component. On the JSP, you need to show the current date, the date of the previous week, and the date of the next week.

    To help you present this information, you have created the following EL functions in the `d' namespace:

    ?Name : curData; signature: java.util.utilDate CurrentDate() ?Name : curData; signature: java.util.utilDate addweek (java.util.Date, int)

    ?Name: dateString; signature: java.util.String getDataString (jave.util.Data)

    Which EL code snippet will generate the string for the previous week?

    A. ${d:dateString(affWeek(curDate(), -1)) }
    B. ${d:dateString [addWeek[curDate[], - ]] }
    C. ${d:dateString [d:addWeek[d:curDate[], - 1]] }
    D. ${d:dateString (d:addWeek(d:curDate(), -1)) }

  • Question 93:

    A servlet class is injected with a JDBC data source. After injection has occurred, the servlet needs to create a cache out of some of the data in the database, so as to improve responsiveness. Which two methods can host the cache creation code? (Choose two)

    A. Servlet.init()
    B. Servlet.destroy()
    C. A method annotated with @Init
    D. A method annotated with @PostConstruct
    E. A method annotated with @PreDestroy
    F. A method annotated with @Resource

  • Question 94:

    Given:

    11.

    <%

    12.

    request.setAttribute ("vals", new String[] {"1", "2", "3", "4"});

    13.

    request.setAttribute ("index", "2");

    14.

    %>

    15.

    <% - - insert code here - - %>

    Which three EL expressions, inserted at line 15, are valid and evaluate to "3"? (Choose three)

    A. ${vals.2}
    B. ${vals ["2"] }
    C. ${vals.index}
    D. ${vals[index] }
    E. ${vals} [index]
    F. ${vals. (vals.index) }
    G. ${vals [vals[index-1]] }

  • Question 95:

    As a convenience feature, your web pages include an Ajax request every five minutes to a special servlet that monitors the age of the user's session. The client-side JavaScript that handles the Ajax callback displays a message on the screen as the session ages. The Ajax call does NOT pass any cookies, but it passes the session ID in a request parameter called sessionID. In addition, assume that your webapp keeps a hasmap of session objects by the ID. Here is a partial implementation of this servlet:

    10.

    public class SessionAgeServlet extends HttpServlet {

    11.

    public void service(HttpServletRequest request, HttpServletResponse) throws IOException {

    12.

    String sessionID = request.getParameter("sessionID");

    13.

    HttpSession session = getSession(sessionID);

    14.

    long age = // your code here

    15.

    response.getWriter().print(age);

    16.

    }

    ... // more code here

    47. }

    Which code snippet on line 14, will determine the age of the session?

    A. session.getMaxInactiveInterval();
    B. session.getLastAccessed().getTime() session.getCreationTime().getTime();
    C. session.getLastAccessedTime().getTime() session.getCreationTime().getTime();
    D. session.getLastAccessed() - session.getCreationTime();
    E. session.getMaxInactiveInterval() session.getCreationTime();
    F. session.getLastAccessedTime() session.getCreationTime();

  • Question 96:

    View the exhibit.

    Assume the tag library in the exhibit is placed in a web application in the path /WEB- INF/tld/example.tld.

    1.

    2.

    Which JSP code, inserted at line 1, completes the JSP code to invoke the hello tag?

  • Question 97:

    Which method must be used to encode a URL passed as an argument to HttpServletResponse. sendRedirect when using URL rewriting for session tracking?

    A. ServletResponse.encodeURL
    B. HttpServletResponse.encodeURL
    C. ServletResponse.encodeRedirectURL
    D. HttpServletResponse.encodeRedirectURL

  • Question 98:

    ServletContextListeners are invoked in

    A. Random order
    B. contextInitialized and contextDestroyed are invoked in the order in which they are declared in the web.xml
    C. contextInitialized method are invoked in the order in which they are declared in the web.xml and the contextDestroyed method is invoked in the reverse order in which they are declared in the web.xml
    D. contextInitialized and contextDestroyed are invoked in the reverse order of which they are declared in the web.xml

  • Question 99:

    The jquery_1_3_2.jar file contains the JQuery Ajax framework in its META-INF/ resources directory. Where should the jar file be placed inside the web application to ensure the resources it contains are accessible by clients?

    A. WEB-INF/classes
    B. WEB-INF/jar
    C. WEB-INF/lib
    D. WEB INF/resources

  • Question 100:

    Given an HttpServletRequest request and an httpServletResponse response:

    41.

    HttpSession session = null;

    42.

    / / insert code here

    43.

    if (session = = null) {

    44.

    / / do something if session does not exist

    45.

    } else {

    46.

    / / do something if session exists

    47.

    }

    To implement the design intent, which statement must be inserted at line 42?

    A. session = response.getSession ();
    B. session = request.getSession ();
    C. session = request.getSession (true);
    D. session = request.getSession (false);
    E. session = request.getSession ("jsessionid");

Tips on How to Prepare for the Exams

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-899 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.