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.)
Reveal answer details Close answer details
Correct answersA, E
Oracle · 1Z0-858
Preview real exam questions, verified answers and available explanations before choosing a study plan.
|
Multiple choice
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.) Reveal answer details Close answer detailsCorrect answersA, E
Multiple choice
Which three are described in the standard web application deployment descriptor? (Choose three.) Reveal answer details Close answer detailsCorrect answersA, B, F
Single choice
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 Furthermore, you have a special login servlet that performs user authentication and retrieves the User 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? Reveal answer details Close answer detailsCorrect answerE
Single choice
Click the Exhibit button. A session-scoped attribute, product, is stored by a servlet. That servlet then forwards to a JSP page. This attribute holds an instance of the com.example.Product class with a name property of "The Matrix" and price property of 39.95. Given the JSP page code snippet: 1. <jsp:useBean id='product' class='com.example.Product'> What is the response output of this JSP page code snippet? ![]() Reveal answer details Close answer detailsCorrect answerB
Single choice
Given a Filter class definition with this method: Which should you insert at line 25 to properly invoke the next filter in the chain, or the target servlet if there are no more filters? Reveal answer details Close answer detailsCorrect answerB
Single choice
Which statement is true about web container session management? Reveal answer details Close answer detailsCorrect answerC
Multiple choice
Which two are characteristics of the Intercepting Filter pattern? (Choose two.) Reveal answer details Close answer detailsCorrect answersD, E
Multiple choice
Given: 11. <% Which three EL expressions, inserted at line 15, are valid and evaluate to "3"? (Choose three.) 100% Real Q&As | 100% Real Pass Reveal answer details Close answer detailsCorrect answersB, D, G
Single choice
A developer is designing a web application that must verify for each request: The originating request is from a trusted network. Which design pattern provides a solution in this situation? Reveal answer details Close answer detailsCorrect answerC
Multiple choice
Which two are characteristics of the Transfer Object design pattern? (Choose two.) Reveal answer details Close answer detailsCorrect answersA, C
Multiple choice
Given the two security constraints in a deployment descriptor: 101. <security-constraint> 100% Real Q&As | 100% Real Pass 104. <role-name>SALES</role-name> If the two security constraints have the same url-pattern and http-method, which two, inserted independently at line 109, will allow users with role names of either SALES or MARKETING to access this resource? (Choose two.) Reveal answer details Close answer detailsCorrect answersB, D
Multiple choice
Which three are valid values for the body-content attribute of a tag directive in a tag file? (Choose three.) Reveal answer details Close answer detailsCorrect answersC, E, F
Single choice
Assume the tag handler for a st:simple tag extends SimpleTagSupport. Reveal answer details Close answer detailsCorrect answerB
Multiple choice
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.) Reveal answer details Close answer detailsCorrect answersB, E
Single choice
Given a portion of a valid Java EE web application's directory structure: MyApp You want to know whether File1.html, File2.html, and/or File3.html is protected from direct access by your What statement is true? Reveal answer details Close answer detailsCorrect answerB
Single choice
Assume that a news tag library contains the tags lookup and item: lookup Retrieves the latest news headlines and executes the tag body once for each headline. Exposes a NESTED page-scoped attribute called headline of type com.example.Headline containing details for that headline. item Outputs the HTML for a single news headline. Accepts an attribute info of type com.example.Headline containing details for the headline to be rendered.Which snippet of JSP code returns the latest news headlines in an HTML table, one per row? Reveal answer details Close answer detailsCorrect answerC
Multiple choice
For which three events can web application event listeners be registered? (Choose three.) Reveal answer details Close answer detailsCorrect answersA, C, F
Single choice
The JSP developer wants a comment to be visible in the final output to the browser. Which comment style needs to be used in a JSP page? Reveal answer details Close answer detailsCorrect answerA
Single choice
You have built a web application that you license to small businesses. The webapp uses a context parameter, called licenseExtension, which enables certain advanced features based on your client's license package. When a client pays for a specific service, you provide them with a license extension key Which code snippet will accomplish this goal? Reveal answer details Close answer detailsCorrect answerA
Single choice
A developer for the company web site has been told that users may turn off cookie support in their browsers. What must the developer do to ensure that these customers can still use the web application? Reveal answer details Close answer detailsCorrect answerA
Single choice
Which JSP standard action can be used to import content from a resource called foo.jsp? Reveal answer details Close answer detailsCorrect answerC
Single choice
Given the web application deployment descriptor elements: 100% Real Q&As | 100% Real Pass 11. <filter> Which element, inserted at line 27, causes the ParamAdder filter to be applied when MyServlet is invoked by another servlet using the RequestDispatcher.include method? Reveal answer details Close answer detailsCorrect answerB
Multiple choice
You want to create a valid directory structure for your Java EE web application, and you want to put your web application into a WAR file called MyApp.war. Which two are true about the WAR file? (Choose two.) Reveal answer details Close answer detailsCorrect answersA, C
Single choice
Click the Exhibit button. Assuming the tag library in the exhibit is imported with the prefix forum, which custom tag invocation produces a translation error in a JSP page? ![]() Reveal answer details Close answer detailsCorrect answerD
Single choice
A developer is designing the presentation tier for a web application which requires a centralized request handling to complete common processing required by each request. Which design pattern provides a solution to this problem? Reveal answer details Close answer detailsCorrect answerB
Single choice
Given a portion of a valid Java EE web application's directory structure: MyApp Which statement is true? Reveal answer details Close answer detailsCorrect answerE
Single choice
Given this fragment from a Java EE deployment descriptor: 124. <welcome-file>beta.html</welcome-file> And this request from a browser: http://www.sun.com/SCWCDtestApp/registerWhichstatementiscorrect,whenthecontainerreceivesthisrequest? Reveal answer details Close answer detailsCorrect answerD
Single choice
Which JSTL code snippet can be used to perform URL rewriting? Reveal answer details Close answer detailsCorrect answerC
Single choice
Click the Exhibit button. Assuming the tag library in the exhibit is imported with the prefix forum, which custom tag invocation produces a translation error in a JSP page? ![]() Reveal answer details Close answer detailsCorrect answerD
Multiple choice
100% Real Q&As | 100% Real Pass Given the security constraint in a DD: 101. <security-constraint> Reveal answer details Close answer detailsCorrect answersA, C, D, F
Single choice
For manageability purposes, you have been told to add a "count" instance variable to a critical JSP Document so that a JMX MBean can track how frequent this JSP is being invoked. Which JSP code snippet must you use to declare this instance variable in the JSP Document? Reveal answer details Close answer detailsCorrect answerA
Single choice
A developer is designing a web application that must support multiple interfaces, including: an XML web service for B2B HTML for web-based clients WML for wireless customers Which design pattern provides a solution for this problem? Reveal answer details Close answer detailsCorrect answerD
Single choice
You are creating an error page that provides a user-friendly screen whenever a server exception occurs. Which EL code snippet inserts this error message into the error page? Reveal answer details Close answer detailsCorrect answerD
Multiple choice
You want to create a valid directory structure for your Java EE web application, and your application uses tag files and a JAR file. Which three must be located directly in your WEB-INF directory (NOT in a subdirectory of WEB-INF)? (Choose three.) Reveal answer details Close answer detailsCorrect answersB, C, E
Single choice
You have a simple web application that has a single Front Controller servlet that dispatches to JSPs to generate a variety of views. Several of these views require further database processing to retrieve the necessary order object using the orderID request parameter. To do this additional processing, you pass the request first to a servlet that is mapped to the URL pattern /WEB-INF/retreiveOrder.do in the deployment descriptor. This servlet takes two request parameters, the orderID and the jspURL. It handles the database calls to retrieve and build the complex order objects and then it dispatches to the jspURL. Which code snippet in the Front Controller servlet dispatches the request to the order retrieval servlet? Reveal answer details Close answer detailsCorrect answerC
Single choice
Given: 10. public void service(ServletRequest request, Which retrieves the binary input stream on line 13? Reveal answer details Close answer detailsCorrect answerC
Single choice
You are creating a library of custom tags that mimic the HTML form tags. When the user submits a form <input type='text' name='firstName' value='Samantha' /> Which tag handler method will accomplish this goal? Reveal answer details Close answer detailsCorrect answerC
Multiple choice
Given an HttpServletRequest request: 22. String id = request.getParameter("jsessionid"); Which three can be placed at line 23 to retrieve an existing HttpSession object? (Choose three.) Reveal answer details Close answer detailsCorrect answersA, C, D
Single choice
Your management has required that all JSPs be created to generate XHTML-compliant content and to facilitate that decision, you are required to create all JSPs using the JSP Document format. In the reviewOrder.jspx page, you need to use several core JSTL tags to process the collection of order items in the customer's shopping cart. Which JSP code snippets must you use in the reviewOrder.jspx page? Reveal answer details Close answer detailsCorrect answerD
Single choice
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? Reveal answer details Close answer detailsCorrect answerD
Single choice
You have a use case in your web application that adds several session-scoped attributes. At the end of the use case, one of these objects, the manager attribute, is removed and then it needs to decide which of the other session-scoped attributes to remove. How can this goal be accomplished? Reveal answer details Close answer detailsCorrect answerA
Multiple choice
Which two are true about the JSTL core iteration custom tags? (Choose two.) Reveal answer details Close answer detailsCorrect answersA, C |