AllExam Dumps

DUMPS, FREE DUMPS, VCP5 DUMPS| VMWARE DUMPS, VCP DUMPS, VCP4 DUMPS, VCAP DUMPS, VCDX DUMPS, CISCO DUMPS, CCNA, CCNA DUMPS, CCNP DUMPS, CCIE DUMPS, ITIL, EXIN DUMPS,


READ Free Dumps For Oracle- 1z0-899





Question ID 4703

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)
 

Option A

A.    pageContext.setAttribute(“name”, theValue);
 

Option B

B.    pageContext.setAttribute(“name”, getSession() );
 

Option C

C.    pageContext.getRequest().setAttribute(“name”, theValue);
 

Option D

D.    pageContext.getSession().setAttribute(“name”, theValue);
 

Option E

E.    pageContext.setAttribute(“name”, theValue, PageContext.PAGE_SCOPE);
 

Option F

F.    pageContext.setAttribute(“name”, theValue, PageContext.SESSION_SCOPE);
 

Correct Answer D,F
Explanation


Question ID 4704

Given that a web application consists of two HttpServlet classes, ServletA and ServletB, and the ServerletA.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)

 

Option A

A.    ensure that the ServletB.service method is synchronized
 

Option B

B.    ensure that the ServletA.service method is synchronized
 

Option C

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

Option D

D.    enclose lines 21-22 in synchronized block:
synchronized(this) (
session.setAttribute(key, “Hello”);
value = session.getAttribute(key);
)
 

Option E

E.    enclose lines 21-22 in synchronized block:
synchronized(session) (
session.setAttribute(key, “Hello”); value = session.getAttribute(key); )
 

Correct Answer C,E
Explanation

Send email to admin@getfreedumps for new dumps request!!!