Oracle 1Z0-899 Certification Sample Questions and Answers

1Z0-899 PDF, 1Z0-899 Dumps PDF Free Download, 1Z0-899 Dumps Free, 1Z0-899 Latest Dumps PDF, 1Z0-899 PDF Free DownloadThe Oracle 1Z0-899 Sample Question Set is designed to help you prepare for the Java EE 6 Web Component Developer Certified Expert (1Z0-899) certification exam. To become familiar with actual Oracle Certification exam environment, we suggest you to try Sample Oracle 1Z0-899 Certification Practice Exam.

This sample Oracle 1Z0-899 certification practice exam is designed for evaluation purposes only. If you really want to test your knowledge to identify your weak areas and familiarize with actual exam format, we suggest you to practice with Premium Oracle 1Z0-899 Certification Practice Exam for Java EE 6 Web Component Developer Certified Expert (1Z0-899) certification. Our team of Java experts have designed Questions-Answers for this premium practice exam by collecting inputs from recently certified candidates. Hence, We strongly recommend you to use Premium Oracle 1Z0-899 Certification Practice Exam to clear your actual Oracle 1Z0-899 Certification Exam with great score.

1Z0-899 Sample Questions:

01. 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.
 
02. You are building a dating web site. The client’s date of birth is collected along with lots of other information. The Person class has a derived method, getAge() :int, which returns the person’s age calculated from the date of birth and today’s date. In one of your JSPs you need to print a special message to clients within the age group of 25 through 35. Which two EL code snippets will return true for this condition?
(Choose two.) 
a) ${client.age in [25,35]}
b) ${client.age between [25,35]}
c) ${client.age between 25,35}
d) ${client.age <= 35 && client.age >= 25}
e) ${client.age le 35 and client.age ge 25}
f) ${client.age > 35 && client.age < 25}
 
03. You are creating a new ISP 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.
 
04. You want to create a filter for your web application and your filter will implement .servlet.Filter. Which two statements are true?
(Choose two)
a) Your filter class must implement an init method and a destroy method.
b) Your filter class must also implement javax.sarvlat.FilterChain.
c) When your filter chains to the next filter, it should pass the same arguments it received in its doFilter method.
d) The method that your filter invokes on the object it received that implements javax-servlet.Filterchain can invoke either another filter or a servlet.
e) Your filter class must implement a doFilter method that takes, among other things, an HttpServletRequest object and an HttpServletresponse object.
 
05. 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 on 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.
 
06. A Client wants to retrieve a representation of a resource, e.g. an XML document, localized according to the preferences of the user. Each user is allowed to specify one or more languages, in order of preference. Such preferences are application independent. How can the Client send language preference Information to the Server using a standard HTTP facility?
a) In the request body
b) In a request header
c) In the request line
d) In the request URL
 
07. A developer wants to make a name attribute available to all servlets associated with a particular user, across multiple requests from that user, from the same browser instance. Which two provide this capability from within a tag handler?
(Choose two)
a) pageContext.setAttribute(“name”, theValue);
b) pageContext.setAttribute(“name”, getSession() );
c) pageContext.getRequest().setAttribute(“name”, theValue);
d) pageContext.getSession().setAttribute(“name”, theValue);
e) pageContext.setAttribute(“name”, theValue, PageContext.PAGE_SCOPE);
f) pageContext.setAttribute(“name”, theValue, PageContext.SESSION_SCOPE);
 
08. Code :
@DataSourceDefinitions(
    value = {
        @DataSourceDefinition (name = "java:app/env/MyDS1",
            minPoolSize = 0,
            initialPoolSize = 0,
            className = "org.apache.derby.jdbc.ClientXADataSource",
            portNumber = 1527,
            serverName = "localhost",
            user = "user",
            password = "pass",
            databaseName = "testdb",
            properties = {"connectionAttributes=;create=true"}
        ),
 
        @DataSourceDefinition (name = "java:comp/env/MyDS12",
            minPoolSize = 0,
            initialPoolSize = 0,
            className = "org.apache.derby.jdbc.ClientXADataSource",
            portNumber = 1527,
            serverName = "localhost",
            user = "user",
            password = "pass",
            databaseName = "testdb",
            properties = {"connectionAttributes=;create=true"}
        )
    }
)
 
@Stateful
 
public class MyStatefulEJB {
 
    ...
    ...
}
 
Assume that MyStatefulEJB is packaged in WAR file. Which of the following JNDI code snippet can obtain JDBC connection for MyDS1 in a servket?
a) try {
    InitialContext ic = new InitialContext();  
    ds = (DataSource) ic.lookup("java:comp/env/MyDS11"); 
    conn = ds.getConnection();  
} catch (SQLException se) {
    throw new ServletException(se);
} catch (NamingException ne) {
    throw new ServletException(ne);
}
b) try {
    InitialContext ic = new InitialContext();  
    conn = (conn) ic.lookup("java:comp/env/MyDS11"); 
} catch (SQLException se) {
    throw new ServletException(se);
} catch (NamingException ne) {
    throw new ServletException(ne);
}
c) try {
    InitialContext ic = new InitialContext();  
    ds = (DataSource) ic.lookup("JNDI:MyDS11"); 
    conn = ds.getConnection();  
} catch (SQLException se) {
    throw new ServletException(se);
} catch (NamingException ne) {
    throw new ServletException(ne);
}
 
09. For which three events can web application event listeners be registered?
Choose three.)
a) when a session is created
b) after a servlet is destroyed
c) when a session has timed out
d) when a cookie has been created
e) when a servlet has forwarded a request
f) when a session attribute value is changed
 
10. Select the valid attributes of <jsp:getProperty>.
(Choose two)
a) name
b) class
c) property
d) id
e) scope

Solutions:

QUESTION: 01

Answer: c

QUESTION: 02

Answer: d, e

QUESTION: 03

Answer: b, d, e

QUESTION: 04

Answer: a, d

QUESTION: 05

Answer: b, e

QUESTION: 06

Answer: b

QUESTION: 07

Answer: d, f

QUESTION: 08

Answer: a

QUESTION: 09

Answer: a, c, f

QUESTION: 10

Answer: a, c

Rating: 4.9 / 5 (46 votes)