[Free] 2018(Jan) EnsurePass Examcollection Oracle 1z0-899 Dumps with VCE and PDF Download 1-10

Ensurepass.com : Ensure you pass the IT Exams 2018 Jan Oracle Official New Released 1z0-899
100% Free Download! 100% Pass Guaranteed!
http://www.EnsurePass.com/1z0-899.html

Java EE 6 Web Component Developer Certified Expert Exam

Question No: 1

In ServletContext.getNamedDispatcher(string arg0) arg0 is the

  1. url of a servlet relative to the ServletRequest

  2. url of a servlet relative to the Context

  3. name of a servlet

  4. absolute url to any servlet in any Context

Answer: B

Question No: 2

Which Java expression can be used to check whether the web container is currently configured to track sessions via URL rewriting?

  1. servletContext.getSessionCookiesConfiq() .isHttpOnly()

  2. servletContext.getSessionCookiesConfiq() .isSecure()

  3. servletContext.getDefaultSessionTrackingModes()

    .contains(SessionTrackingMode.URL)

  4. servletContext.getEffectiveSessionTrackingModes() .contains (SessionTrackingMode.URL)

Answer: D

Explanation: Code example: String sessionID = null;

if (request.getServletContext().getEffectiveSessionTrackingModes() contains(SessionTrackingMode.URL)) {

// Get the session ID if there was one sessionID = request.getPathParameter( SessionConfig.getSessionUriParamName( request.getContext()));

if (sessionID != null) { request.setRequestedSessionId(sessionID); request.setRequestedSessionURL(true);

}

}

C: getDefaultSessionTrackingModes

java.util.Setlt;SessionTrackingModegt; getDefaultSessionTrackingModes()

Gets the session tracking modes that are supported by default for this ServletContext.

Question No: 3

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:

lt;jsp: useBean id = “aBean” class = “MyBean” scope = “page” \ /gt;

lt;jsp: getProprty name = “aBean” property = “roasted” \ /gt; Which is true?

  1. the page will include the output false

  2. the page will include the output

  3. the page will report that the property roasted does not exist

  4. the page will report that the syntax of the useBean tag is incorrect

  5. the page will report that the syntax of the getProperty tag ls incorrect

Answer: E

Reference: http://www.emacao.gov.mo/documents/18/06/exam.pdf (4th table from the top)

Question No: 4

A popular Ajax framework and its companion widget library contain several hundreds of files of different types (.js, .ess, .html). Your company has mandated that all its web applications use only specific versions of this framework approved by IT and repackaged internally as jar files. Furthermore, web applications should only include the entire jar, without subsetting or modification.

Where should the framework#39;s files be placed inside a jar file to enable this kind of reuse?

  1. under resources

  2. under META-INF/resources

  3. under META-INF/web-contents

  4. under WEB-INF/resources

Answer: B

Reference: http://ocpsoft.com/opensource/create-common-facelets-jar/ (check the box with the update)

Question No: 5

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 lt;titlegt; tag that requests the page name to be specified dynamically when the header is imported.

Which JSP code snippet performs the import of the header content?

  1. lt;jsp:include page=’/WEB-INF/jsp/header.jsp’gt;

    lt;jsp:param name=’pageName’ value=’Welcome Page’ /gt;

    lt;/jsp:includegt;

  2. lt;jsp:import page=’/WEB-INF/jsp/header.jsp’gt;

    lt;jsp:param name=’pageName’ value=’Welcome Page’ /gt;

    lt;/jsp:importgt;

  3. lt;jsp:include page=’/WEB-INF/jsp/header.jsp’gt;

    lt;jsp:attribute name=’pageName’ value=’Welcome Page’ /gt;

    lt;/jsp:includegt;

  4. lt;jsp:import page=’/WEB-INF/jsp/header.jsp’gt;

lt;jsp:attribute name=’pageName’ value=’Welcome Page’ /gt;

lt;/jsp:importgt;

Answer: A

Question No: 6

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)

  1. In the init method.

  2. In the jspInit method.

  3. In the constructor of the JSP#39;s Java code.

  4. In a JSP declaration, which includes an initializer block.

  5. In a JSP declaration, which includes a static initializer block.

Answer: B,D,E

Question No: 7

Which defines the welcome files in a web application deployment descriptor?

  1. lt;welcomegt;

    lt;welcome- file gt;/ welcome – jsplt;/welcome-filegt;

    lt;/welcomegt;

    lt;welcomegt;

    lt;welcome-filegt;/index-htmllt;/welcome-filegt;

    lt;/welcomegt;

  2. lt;we1come-file-listgt;

    lt;welcome-filegt; welcome .jsplt;/welcome-filegt;

    lt;welcome-filegt;index.htmllt;/welcome-filegt;

    lt;/welcome-file-listgt;

  3. lt;welcomegt;

    lt;welcome-filegt;welcome.jsplt;/welcome lt;/we1come gt;

    lt;/welcome gt;

    lt;welcome-filegt;index.htmllt;//welcome-filegt;

    lt;/we1come gt;

  4. lt;we1come-file-listgt;

    lt;welcome-filegt; welcome .jsplt;/welcome-filegt;

    lt;welcome-filegt;/index.htmllt;/welcome-filegt;

    lt;/welcome-file-listgt;

  5. lt;welcomegt;

lt;welcome-filegt;

lt;welcome-namegt; welcome lt;/welcome-namegt;

lt;locationgt; welcome.jsp lt;/locationgt;

lt;/welcome-filegt;

lt;welcome-filegt;

lt;welcome-namegt;indexlt;/welcome-namegt;

lt;locationgt; index lt;/locationgt;

lt;/welcome-filegt;

lt;/welcomegt;

Answer: B

Question No: 8

You have a use in your web application that adds several session-scoped attributes. At the end of the use case, one of these objects, the manage attribute, is removed and then it needs to decide which of the other session-scoped attributes to remove.

How can this goal be accomplished?

  1. The object of the manager attribute should implement the HttpSessionBindingListener and it should call the removeAttribute method on the appropriate session attributes.

  2. The object of the manager attribute should implement the HttpSessionListenar and it should call the removeAttribute method on the appropriate session attributes.

  3. The object of the manager attribute should implement the HttpSessionBindingListener rind it should call the deleteAttribute method on the appropriate session attributes.

  4. The object of the manager attribute should implement the HttpsessionListener and it should call the deleteAttribute method on the appropriate session attributes.

Answer: A

Question No: 9

A developer chooses to avoid using singieThreadModel but wants to ensure that data If; updated in a thread safe manner.

Which two can support this design goal? (Choose two)

  1. Store the data in a local variable.

  2. Store the data in an instance variable.

  3. Store the data in the Httpsession object.

  4. Store the data in the sarvletContext object.

  5. Store the data in the ServletRequest object.

Answer: A,E

Question No: 10

Which two are true about the JSTL core iteration custom tags? (Choose two.)

  1. It may iterate over arrays, collections, maps, and strings.

  2. The body of the tag may contain EL code, but not scripting code.

  3. When looping over collections, a loop status object may be used in the tag body.

  4. It may iterate over map, but only the key of the mapping may be used in the tag body.

  5. When looping over integers (for example begin= ‘1’ end= ’10’), a loop status object may not be used in the tag body.

Answer: A,C

100% Ensurepass Free Download!
Download Free Demo:1z0-899 Demo PDF
100% Ensurepass Free Guaranteed!
1z0-899 Dumps

EnsurePass ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
PDF VCE Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No