1Z0-899 Exam Questions
197 real 1Z0-899 exam questions with expert-verified answers and explanations. Page 1 of 4.
- Question #1
APIs for dynamically registering servlets and filters can be called at:
- Question #2
ServletRegistration.Dynamic can be used to configure (Choose two)
- Question #3
A web application wants to register a new servlet at runtime using one of the servletContext.addServlet methods. In the implementation of which method is it legal to perform this o...
- Question #4
You want to create a filter for your web application and your filter will implement .servlet.Filter. Which two statements are true? (Choose two)
- Question #5
You have a simple wpb application that has a single Front Controller servlet that dispatches to JSPs generate a variety of views. Several of these views require further database pr...
- Question #6
Given the JavaBean class: public class MyBean { private Boolean roasted = false; public MyBean () {} public Boolean isRoasted () { returned roasted } public void setRoasted (Boolea...
- Question #7
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)
- Question #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 n...
- Question #9
The Squeaky Beans Inc. shopping application was initially developed for a non-distributed environment. The company recently purchased the Acme Application Server, which supports di...
- Question #10
Given an HttpServletRequest request and an httpServletResponse response: 41. HttpSession session = null; 42. / / insert code here 43. if (session = = null) { 44. / / do something i...
- Question #11
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 h...
- Question #12
Which interface must a class implement so that instances of the class are notified after any object added to a session?
- Question #13
Which statement is true about web container session management?
- Question #14
A method call inside your servlet has thrown an IOException resulting from a lost network connection to a necessary resource. The servlet has determined that it will be unable to o...
- Question #15
During initialization, a servlet finds that the database connection it requires is unavailable. As the system designer, you know that the database start up completes several minute...
- Question #16
A servlet wishes to indicate that it is unable to initialize at the present time, but that the initialization might succeed at some future time. Which is true?
- Question #17
In a jsp-centric shopping cart application cart application to move a client's home address of Customer object into the shipping address of the order object. The address data is st...
- Question #18
You are creating a JSP page to display a collection of data. This data can be displayed in several different ways so the architect on your project decided to create a generic servl...
- Question #19
Which JSP standard action can be used to import content from a resource called foo.jsp?
- Question #20
A web application allows the HTML title banner to be set using a context initialization parameter called titlestr. Which two properly set the title in the scenario? (Choose two)
- Question #21
Refer to the Exhibit. Assuming the tag library in the exhibit is imported with the prefix forum, which custom tag invocation procedures a transaction error in a jsp page?
- Question #22
Given the element from the web application deployment descriptor: <jsp -property -gro>t; <url -patter>;/main/page1.js<;/url -patte>t; <scripting -invali>;tru<;/scripting -inval>t;...
- Question #23
Which three EL expressions, inserted at line 15, are valid and evaluate to "3"? (Choose three) 11. <% 12. request.setAttribute ("vals", new String[] {"1", "2", "3", "4"}); 13. requ...
- Question #24
Which three EL expressions, inserted at line 16, are valid and evaluate to "d"? (Choose three)
- Question #25
You are building a dating service web site. Part of the form to submit a client's profile is a group of radio buttons for the person's hobbies: 20. <input type = `radio' name = `ho...
- Question #26
What is the result? 1. <% int[] nums = {42,420,4200}; 2. request.setAttribute("foo", nums); %> 3. ${5 + 3 It 6} 4. S(requestScope['foo'][0] ne 10 div0> 5. ${10 div 0}
- Question #27
You are building a web application with a scheduling component. On the JSP, you need to show the current date, the date of the previous week, and the date of the next week. To help...
- Question #28
Given a header in an HI IP request: X-Retries: 4 A Which two retrieve the value of the header from a given HttpServletRequest request? (Choose two)
- Question #29
Given an HttpServletRequestrequest and HttpResponseresponse, which sets a cookie "username" with the value "joe" in a servlet?
- Question #30
Which annotation enables a servlet to efficiently process requests of typo multipart/form-data that involve large files being uploaded by the client?
- Question #31
You are implementing a model component. You realize that an IOException might arise if you lose connection to the database. How should you address this?
- Question #32
Which is a valid value for the enum EmptyRoleSemantic in Javax.servlet.annotation.ServletSecurity?
- Question #33
In which two locations can library dependencies be defined for a web application? (Choose two)
- Question #34
The jquery_1_3_2.jar file contains the JQuery Ajax framework in its META-INF/ resources directory. Where should the jar file be placed inside the web application to ensure the reso...
- Question #35
Given a jar file packaged with three web fragments with names X, Y and Z respectively. Which of the following deployment descriptor, web.xml, snippets correspond to the web fragmen...
- Question #36
Which defines the welcome files in a web application deployment descriptor?
- Question #37
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 operati...
- Question #38
Which annotation specifies the metadata as a javax.servlet.http.HttpSessionListener?
- Question #39
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...
- Question #40
You are creating a web form with this HTML: 11. <form action="sendOrder.jsp"> 12. <input type="text" name="creditCard"> 13. <input type="text" name="expirationDate"> 14. <input typ...
- Question #41
Your web application requires the ability to load and remove web files dynamically to the web container's file system? Which two HTTP methods are used to perform these actions? (Ch...
- Question #42
A web application wants to expose to its clients an operation that results in a transaction being performed across several systems, for example the transfer of money from one bank...
- Question #43
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 lan...
- Question #44
Which JSTL code snippet can be used to import content from another web resource?
- Question #45
In ServletContext.getNamedDispatcher(string arg0) arg0 is the
- Question #46
When using Servlet asynchronous API if you want to dispatch the request back to a particular url - "/url" within the same Servlet Context which of the following API would you use?
- Question #47
Refer to the Exhibit. A servlet sets a session-scoped attribute product with an instance of com.example.product an forward to a JSP. Which two output the name of the product in the...
- Question #48
Which describes a trigger that causes a call to an AsyncListener?
- Question #49
You need to create a JavaBean object that is used only within the current ISP page. It must NOT be accessible to any other page including those that this page might import. Which J...
- Question #50
Click the Exhibit button. Given the HTML form: 1. <html> 2. <body> 3. <form action="submit.jsp"> 4. Name: <input type="text" name="i1"><br> 5. Price: <input type="text" name="i2"><...