1. if you need to use the a store, which of the fol, statement type shop be used to call the procedure?
A. Statement
B. PreparedStatement
C. Callablestatement
The answer is: c
2. Which of the following will not cause a jdbc driver to be loaded and registered with the drivermanager?
A. Class.Forname (driverstring);
B. New driverclass ();
C. Include Driver Name in JDBC.DRIVERS SYSTEM PROPERTY
D. None of the Above
The answer is: d
3. From Which Object Do you ask for databaseMetadata?
A. Connection
B. Resultset
C. DriverManager
D. Driver
The answer is: a
4. A CUSTOMER WITH A COMPUTER COAN ONLY HAS A SESSION?
A. True
B. False
The answer is: b
5. IF One Intends To Work with A ResultSet, Which of these PreparedStateMETHODS WILL NOT WORK?
A. EXECUTE ()
B. EXECUTEQUERY ()
C. EXECUTEUPDATE ()
The answer is: c
6. Can a servlet installation SERVES MORE THAN ONE REQUESTS AT THE SAME TIME?
A. YES
B. NO
The answer is: a
7. How can I use jdbc to create a database?
A. Include Create = True At End of JDBC URL
B. Execute "Create Database JGuru" SQL Statement
C. EXECUTE "strsql" and "create collection jguru" SQL STATEMENTS
D. Database Creation IS DBMS Specific
The answer is: d
8. Which Character Is Used to REPRESENT An Input Parameter in a callablestatement?
A.%
B. *
C.?
D. #
The answer is: c
9. Which One of the Following Will Not get The Data from The First Column of ResultSet Rs, Returned from Executing The Following SQL Statement: Select Name, Rank, Serialno from Employee.
A. rs.getstring (0);
B. Rs.getstring ("name");
C. Rs.getstring (1);
The answer is: c
10. Which of the following can you do with a JDBC 2.0 Database Driver That You Cannot WITH A JDBC 1.x Driver? A. Batch Multiple Statements, To Be Sent to the Database TOGETHER
B. Scroll Through Result Sets Bi-Directionally
C. Work with SQL3 Data Types Directly
D. All of the Above
The answer is: a
11. Which Class Contains the Transaction Control Methods SetAutocommit, Commit, And Rollback?
A. Connection
B. Statement
C. ResultSet
The answer is: c
12. WHEN a JSP Page Is Compiled, What is it turned INTO?
A. applet
B. Servlet
C. Application
D. mailet
The answer is: b
13. Which of the following is not a standard Method Called AS Part of the JSP Life Cycle?
A. jspinit ()
B. jspservice ()
C. _JspService ()
D. jspdestroy ()
The answer is: c
14. If You Want To Override a JSP File's Initialization Method, WITHIN What TYPE OF TAGS MUST You Declare The Method?
A. <@ @>
B. <% @%>
C. <%%>
D. <%!%>
The answer is: d
15. Which of the following can not be used as the scope winter? Javabean with jsp?
A. Application
B. Session
C. Request
D. Response
E. PAGE
The answer is: a
16. The Implicit JSP Objects Like Request, RESPONSE, AND OUT is Only Visible In The _jspservice () Method.
A. True
B. False
The answer is: b
17. What is the key Difference BetWeen Using a
A. Forward Executes on The Client While Sendredirect () Executes on The Server.
B. Forward Executes on The Server While Sendredirect () Executes on The Client.
C. The Two Methods Perform Identically.
The answer is: c
18. Which of the folloading statements makess your compiled JSP Page IMPLEMENT The SingLethReadModel Interface?
A. <% @ Page isthreadsafe = "false"%> b. <% @ Page isthreadsafe = "true"%>
The answer is: b
19. of The Following Four Valid Comment Styles That Can Be Used WITHIN JSP PAGES, Which Can the End User See?
A. <% - My Comments <% Out.println ("Hello World");%> -%>
B.
C. <% // for
Loop
For (int i = 1; i <= 4; i ) {%>
<%}%>
D. <% / ** yet another comment * /
Javadoc Rules
%>
The answer is: a
20. How can a servlet call A JSP error Page?
A. this Capability is not supported.
B. When the servlet throws the exception, it will automaticly be caught by the calling jsp page.
C. The Servlet Needs to Forward The Request to the Specific Error Page Url. The Exception IS Passed ALONG AS An Attribute Named "javax.servlet.jsp.jspexception".
D. The Servlet Needs to Redirect The Response To The Specific Error Page, Saving The Exception Off in a cookie.
The answer is: c
21. WHEN USING A Javabean to get all the parameters from a form
A. *
B. ALL
C. @ @
D. =
The answer is: b
22. Choose The Statement That Best Describes The Relationship Between Jsp And Servlets:
A. Servlets Are Built ON JSP Semantics and All Servlets Are Compiled to JSP Pages for Runtime Usage.
B. JSP and servlets are unrelated technologies.C. Servlets and JSP are competing technologies for handling web requests. Servlets are being superseded by JSP, which is preferred. The two technologies are not useful in combination.
D. JSPS Are Built ON Servlet Semantics and All JSPS Are Compiled to Servlets for Runtime Usage.
The answer is: d
23. What is a benefit of usding javabeans to seiparate Business Logic from Presenation Markup WITHIN THE JSP ENVIRONMENT?
A. IT Allows The JSP to Access MiddleWare.
B. It creates a cleaner role separation between the web-production team and the software development team, so that the web-production team can focus on presentation markup, while the software team can focus on building reusable software components for helping to generate dynamic displays .
C. IT Provides a Dynamic Markup Environment, Such That JavaBeans Aregrated Seamless, in ORDER TO CREATE The Dynamic Display for the Client.
D. IT Provides The Developer with Full Access To The Java 2 Platform Enterprise Edition (J2EE),
Which is unavailable from outside the javabean environment.
The answer is: b
24. Why Use RequestDispatcher To Forward A Request to Another Resource, INSTEAD OF USING A SendRedirect?
A. Redirects Are no longer supported in The Current Servlet API.
B. Redirects Are Not a Cross-Platform Portable Mechanism.
C. The RequestDispatcher Does Not Use The Reflection API.
D. The RequestDispatcher Does Not Require A Round Trip to The Client, And Thus More Efficient and Allows The Server To Maintain Request State.
The answer is: d
25. What Alternative EXIST TO Embedding Java Code Directly WITHIN THE HTML MARKUP OF Your JSP Page?
A. Moving The code Into your session manager.b. Moving The code Into scripTlets.
C. Moving The Code Into JavaBeans and Servlets.
D. Moving The Code Into a Transaction Manager.
The answer is: b
26. What type of scriptlet code is better-suited to being Moved Into a servlet?
A. Code That DEALS with Logic That IS Common Across Requests.
B. Code That Deals with logic That is vendor specific.
C. Code That Deals with Logic That Relates to Database Access.
D. Code That Deals with Logic That Relates To Client Scope.
The answer is: c
27. How To Retrieve A Value from a Request Object Which We Inputted in HTML FORM?
A. req.getaTribute ()
B. Req.getParameter ()
The answer is: a
28. Are CUSTOM TAGS AVAILABLE IN JSP 1.0? If NOT, How else might you used Iteration from WITHIN A JSP?
A. Yes, But The Only Tags Available Relate To Database Access.
B. No. To Itereate over a Collection of Values, One Must Use Scriptlet Code.
C. NO, But there is a standard
D. Yes, But Custom Tags Will NOT HELP Developers Create Tags for Use in ity OFOVER A Collection.
The answer is: d
29. What is the INITIAL CONTACT POINT for HANDLING A Web Request in a Page-centric architecture?
A. a jsp page.
B. A javabean.
C. a servlet.
D. a session manager.
The answer is: c
30. What is The Difference Between Doing An Include or a Forward with a RequestDispatcher?
A. The forward method transfers control to the designated resource, while the include method invokes the designated resource, substitutes its output dynamically in the display, and returns control to the calling page.
B. The Two Methods Provide The Same Functionality, But with DiffERENT Levels of Persistence.
C. The forward method is deprecated as of JSP 1.1 and the include method should be used in order to substitute portions of a dynamic display at runtime.D. The include method transfers control to a dynamic resource, while the forward method allows for dynamic substitution Of Another JSP Pages Output, Returning Control To The Calling Resource.
The answer is: d