It is impossible to pass Oracle 1Z0-899 exam without any help in the short term. Come to Pass4sure soon and find the most advanced, correct and guaranteed Oracle 1Z0-899 practice questions. You will get a surprising result by our Renewal Java EE 6 Web Component Developer Certified Expert Exam practice guides.
♥♥ 2021 NEW RECOMMEND ♥♥
Free VCE & PDF File for Oracle 1Z0-899 Real Exam (Full Version!)
★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions
Free Instant Download NEW 1Z0-899 Exam Dumps (PDF & VCE):
Available on:
http://www.surepassexam.com/1Z0-899-exam-dumps.html
Q71. }
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();
Answer: F
Q72. 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
Answer: B
Q73. 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.
Answer: C
Q74. Which code snippet specifies the metadata for a servlet with:
(i) url mapping “/mytest”’
(ii) Initial parameter with name “debug” and value “10”’
(iii) Support asynchronous operation?
A. @WebServlet("/mytest")
@InitParam(name-"debug" va1ue = "10")
@Asynchronous
public class TestServlet extends HttpServlet {}
B. @WebServlet (“/myset”)
@WebParam(name = “debug” value = “10”)
Public class testServlet {}
C. @WebServlet (urlPatterns = { / “mytest”},
Initparams = {@InitParam (name = “debug”, value = “10”) }, supportAsync = true)
public class TestServlet extends HttpServlet {}
D. @WebServlet (urlPatterns = { / “mytest”},
Initparams = {@InitParam (name = “debug”, value= “10”) }, asyncSupported = true)
public class TestServlet extends HttpServlet {}
E. @WebServlet (urlPatterns = { / “mytest”},
Initparam = @WebInitParam (name = “debug”, value = “10”), supportAsync = true)
public class testServlet {}
Answer: D
Q75. APIs for dynamically registering servlets and filters can be called at:
A. Context initialization time
B. Any time
C. There is no way to dynamically register servlets and filters
D. Context destruction time
E. Injected into a servlet context
Answer: A
Q76. Users of your web application have requested that they should be able to set the duration of their sessions. So for example, one user might want a webapp to stay connected for an hour rather than the webapp's default of fifteen minutes; another user might want to stay connected for a whole day.
Furthermore, you have a special login servlet that performs user authentication and retrieves the object from the database. You want to augment this code to set up the user's specified session duration.
Which code snippet in the login servlet will accomplish this goal?
A. User user = / / retrieves the user objects object from the database session.setDurationInterval (user.getSessionDuration());
B. User user = / / retrieves the User objects from the database session.setInactiveInterval (user.getSessionDuration());
C. User user = / / retrieves the user objects object from the database session.setInactiveInterval (user.get.SessionDuration());
D. User user = / / retrieves the user objects object from the database session.setDuration (user.getSessionDuration());
E. User user = / / retrieves the user objects object from the database session.setMaxInactiveInterval (user.getSessionDuration());
F. User user = / / retrieves the user objects object from the database session.setMaxDurationInterval (user.getSessionDuration());
Answer: E
Q77. 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.
Answer: BE
Q78. Given the portion of a valid Java EE web application’s directory structure:
You want to know whether File1.html, File2.html, and/or File3.html is protected from direct access by your web client’s browsers. What statement is true?
A. All three files are directly accessible.
B. Only File1.html is directly accessible.
C. Only File2.html is directly accessible.
D. Only File3.html is directly accessible.
E. Only File1.html and File2.html are directly accessible.
F. Only File1.html and File3.html are directly accessible.
G. Only File2.html and File3.html are directly accessible.
Answer: B
Q79. 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
Answer: ACF
Q80. Given the annotation for MyServlet:
@WebServlet{"/abc") @ServletSecurity (value=@HttpConstraint)
public class Myservlet extends Httpservlet {
Which two are true? (Choose two)
A. No protection of user data must be performed by the transport.
B. All user data must be encrypted by the transport.
C. Access is to be denied independent of authentication state and identity.
D. Only authenticated users are to be permitted.
E. Access is to be permitted independent of authentication state and identity.
Answer: BC