Given:
3.
public class MyTagHandler extends TagSupport {
4.
public int doStartTag() {
5.
// insert code here
6.
// return an int
7.
}
8.
// more code here ...
18. }
There is a single attribute foo in the session scope.
Which three code fragments, inserted independently at line 5, return the value of the attribute? (Choose three.)
A. Object o = pageContext.getAttribute("foo");You are building a web application that will be used throughout the European Union; therefore, it has significant internationalization requirements. You have been tasked to create a custom tag that generates a message using the
java.text.MessageFormat class. The tag will take the resourceKey attribute and a variable number of argument attributes with the format, arg
generates:
The disk "MyDisk" contains 1247 file(s).
Which Simple tag class definition accomplishes this goal of handling a variable number of tag attributes?
A. public class MessageTag extends SimpleTagSupportimplements VariableAttributes {private Map attributes = new HashMap();public void setVariableAttribute(String uri,String name, Object value) {this.attributes.put(name, value);}// more tag handler methods}You are building JSP pages that have a set of menus that are visible based on a user's security role. These menus are hand-crafted by your web design team; for example, the SalesManager role has a menu in the file /WEB-INF/html/salesmgr-menu.html. Which JSP code snippet should be used to make this menu visible to the user?
You need to store a Java long primitive attribute, called customerOID, into the session scope. Which two code snippets allow you to insert this value into the session? (Choose two.)
A. long customerOID = 47L;session.setAttribute("customerOID", new Long(customerOID));A developer chooses to avoid using SingleThreadModel but wants to ensure that data is updated in a thread-safe manner. Which two can support this design goal? (Choose two.)
A. Store the data in a local variable.You have built a collection of custom tags for your web application. The TLD file is located in the file: / WEB-INF/myTags.xml. You refer to these tags in your JSPs using the symbolic name: myTags. Which deployment descriptor element must you use to make this link between the symbolic name and the TLD file name?
A. myTags/WEB-INF/myTags.xmlA developer is designing a web application which extensively uses EJBs and JMS. The developer finds that there is a lot of duplicated code to build the JNDI contexts to access the beans and queues. Further, because of the complexity, there are numerous errors in the code. Which J2EE design pattern provides a solution for this problem?
A. CommandIf you want to use the Java EE platform's built-in type of authentication that uses a custom HTML page for authentication, which two statements are true? (Choose two.)
A. Your deployment descriptor will need to contain this tag:CUSTOM.Which two are characteristics of the Service Locator pattern? (Choose two.)
A. It encapsulates component lookup procedures.Click the Exhibit button. Given:
11.
<% com.example.Advisor advisor = new com.example.Advisor(); %>
12.
<% request.setAttribute("foo", advisor); %>
Assuming there are no other "foo" attributes in the web application, which three are valid EL expressions for retrieving the advice property of advisor? (Choose three.)

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