Question Bank For Class Test-2
Question Bank For Class Test-2
16) Database programming using Java throws which of the following exception?
(a) SQLException (b) ClassNotFoundException
(c) None of these (d) Both of these
17) _____________ is a table of data which represents a data from table.
(a) MetaData (b) ResultSetMetaData
(c) ResultSet (d) Statement
37) Name the http method used to send resources to the server.
(a) FTP method (b) PUT method
(c) WRITE method (d) COPY method
40) ________ is a small piece of information that is passed back & forth in HTTP request & response.
(a) Servlet (b) Applet
(c) Cookie (d) Session
41) Which method is used to specify before any lines that used the PrintWriter?
(a) setPageType( ) (b) setContextType( )
(c) setContentType( ) (d) setResponseType( )
42) A user types the URL http://www.msbte.com/result.php. Which request gets generated?
(a) GET method (b) POST method
(c) HEAD method (d) PUT method
44) The following methods belongs to the life cycle methods of the servlet.
(a) init( ) (b) service( ) (c) destroy( ) (d) All of the above
45) Apache Tomcat is ________.
(a) Servlet (b) Java Program
(c) API (d) Web server capable of running Java programs
46) Servlet lifecycle has _________ states.
(a) Two (b) Three (c) Four (d) Five
47) How to send data in get method?
(a) using GET method in request (b) using Requesting URL
(c) using Response URL (d) using URL
48 What is the limit of data to be passed from HTML to doGet() ?
(a) 8kb (b) 1kb (c) 4kb (d) 2kb
49) The major difference between Servlet and CGI is _______.
(a) Servlets are thread based and CGI is process based.
(b) Servlet executes slower than CGI.
(c) Servlet has no platform specific API where as CGI has.
(d) All of these
50) The authentication mechanism in the servlet specification uses a technique called ?
(a) Role Based Authentication (b) Form Based Authentication
(c) Both a & b (d) None of the above