Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

IBM 000-150 Exam -

Free 000-150 Sample Questions:

1. A developer wants to measure how many times a servlet has been invoked. Which listener could be used to accomplish this task?
A. HttpSessionListener
B. ServletContextListener
C. ServletRequestListener
D. ServletRequestAttributeListener
Answer: C

2. A Web application contains a single servlet that handles all types of requests. Within the Web application there is an HTML page that contains a form that uses a POST type request. There are also hyperlinks with query strings associated with them. The servlet must handle both HTML form and hyperlink requests. Which two methods of the HttpServlet class should be overridden by the servlet programmer?
A. doGet()
B. doPut()
C. doPost()
D. doQuery()
E. doForm()
Answer: A, C

3. Which two of the following situations will result in the init() method of a servlet being invoked?
A. Every time a new client accesses the servlet
B. When the server automatically reloads the servlet
C. When a HTTP INIT type request is made by a client
D. When the servlet is put into service after loading and instantiation
Answer: B, D

4. If a server has URL rewriting enabled, what is the result of using the encodeURL() method of the HttpResponse interface?
A. Encryption of sensitive client data in the URL
B. Increased performance due to browser specific information being encoded in the URL
C. Redirection of all subsequent requests to a unique domain specified as a URL parameter
D. Addition of a client's session ID to the URL in a query string
Answer: D

5. A client has accessed a servlet via a form that uses an HTTP POST request. Which two methods could be used by the servlet to obtain information input within the form?
A. Using the servlet object's getServletInfo() method
B. Using the request object's getAttribute() method
C. Using the request object's getParameter() method
D. Using the request object's getParameterValues() method
E. Using the request object's getAttributeValues() method
Answer: C, D

6. Which of the following would be legal parameters for the include() method of the RequestDispatcher object?
A. ServletHttpRequest, ServletHttpResponse
B. HttpServletReq, HttpServletResp
C. ServletRequest, ServletResponse
D. ServletReq, ServletResp
Answer: C

7. What is the BEST scope to store an object containing display data that is to be sent from a servlet to a JSP page with session disabled?
A. page
B. request
C. session
D. application/servletContext
Answer: B

8. Which method in the ServletContext interface could be used to get the value of a variable named times_Accessed ?
A. getAttribute("times_Accessed")
B. getAttributeValue("times_Accessed")
C. getParameter("times_Accessed")
D. getParameterValue("times_Accessed")
Answer: A

9. A servlet has been configured in a deployment descriptor file with servlet specific initialization parameters. Through which interface can a servlet access these initialization parameters?
A. ServletConfig
B. ServletContext
C. HttpServletRequest
D. HttpServletResponse
Answer: A

10. Which two of the following may be contained in a WAR file?
A. Enterprise JavaBeans
B. Servlets
C. JSP pages
D. Client-side Java Applications
Answer: B, C

11. Which three of the following would be individually registered in a WAR file deployment descriptor?
A. JavaBeans
B. Servlet event listeners
C. Servlet filters
D. Servlets
E. HTML pages
Answer: B, C, D

12. Which method will cause the session to be automatically invalidated if it is not used during a specified time interval?
A. setTimeOutInterval()
B. setInactiveTimeOutInterval()
C. setInvalidateInterval()
D. setMaxInactiveInterval()
Answer: D

13. In a Web application that is layered in accordance with the MVC design pattern, which object or layer of code is responsible for deciding whether the user request should be accepted given the current state of the application?
A. JavaScript within the HTML page that submits the request
B. The servlet that receives the request
C. The transaction manager object that ensures consistency of persistent data
D. The core business logic of the application
Answer: B

14. In a travel booking Web application, a servlet uses JAX-RPC to call a Web service to alter the date on an airline ticket. The Web service throws an exception indicating it cannot change the flight because no seats are available on the requested new date. How does the servlet know that the request was not successful?
A. The servlet receives a SOAP message that contains a fault element.
B. The servlet receives a SOAP message that contains an empty body.
C. The servlet catches a java.rmi.RemoteException or a service-specific exception.
D. The servlet catches a javax.xml.rpc.JAXRPCException.
Answer: C

15. All of the following are a recommended use for servlet filters EXCEPT:
A. Authentication
B. Encryption
C. Protocol converter
Answer: C

© 2014, All Rights Reserved