Part 1 of 2 - Part 1 Question 1 of 20
40.0/ 50.0 Points 5.0/ 5.0 Points
Which of the following correctly defines JSP technology A. JSP page is a xml-based document that describes how to process a request to create a response. B. JSP page is a text-based document that describes how to process a to response create a request. C. JSP page is a xml-based document that describes how to process a request to create a response. D. JSP page is a text-based document that describes how to process a request to create a response. Question 2 of 20
0.0/ 5.0 Points
Which tag in the jsp is used to define the error page? A. location
B. exception-type
C. error-page
D. None of the above
Question 3 of 20
The three most important methods of the servlets are A.Destroy()
B.Init()
5.0/ 5.0 Points
C.Service()
D.Resume()
Question 4 of 20
5.0/ 5.0 Points
Implementing the tag < %@ page isThreadSafe="false" % >implements the SingleThreadModel interface making the Jsp _________________ A. Content safe
B. Synchornised
C. Thread safe
D. None of the above
Question 5 of 20
0.0/ 5.0 Points
Which of the tag contains a code fragment valid in the page scripting language? A. <%= expressions %>
B. <%-- comment -- %>
C. <%! Declarations %>
D. <% code fragment %>
Question 6 of 20
The two primary constituents of JavaBean are A.Directives
B.Properties
5.0/ 5.0 Points
C.Methods
D.Scripting Elements
Question 7 of 20
5.0/ 5.0 Points
_______ is the process of creating a copy of an object suitable for passing to another object A. Serialization
B. Sockets
C. Reflection
D. Cookies
Question 8 of 20
5.0/ 5.0 Points
A java bean in a JSP can have which of the following attributes A.Session
B.Page
C.Request
D.User
Question 9 of 20
Which of the following can be used to access database from JSPs? A.Custom tags
B.Beans
5.0/ 5.0 Points
C.Scriplets
D.Directives
5.0/ 5.0 Points
Question 10 of 20
The JSP Model I architecture uses which of the following i) It uses JSP along with beans ii) JSP instantiates the bean, and then gets data from the bean for presentation iii) View is the JSP iv) Controller is the Servlet or JSP A. iii-iv
B. i-ii
C. ii-iii
D. i-iv
Part 2 of 2 - Part 2 Question 11 of 20
45.0/ 50.0 Points 5.0/ 5.0 Points
The include() method of RequestDispatcher A. sends a request to another resource like servlet, jsp or html
B. includes resource of file like servlet, jsp or html
C. appends the request and response objects to the current servlet
D. None of the above
Question 12 of 20
5.0/ 5.0 Points
What is the limit of data to be passed from HTML when doGet() method is used?
A. 4K
B. 8K
C. 1K
D. 2K
Question 13 of 20
5.0/ 5.0 Points
The major difference between servlet and CGI is A. Servlets are thread based and CGI is process based
B. Servlets executes slower compared to CGI
C. Servlet has no platform specific API, where as CGI has
D. All of the above
Question 14 of 20
5.0/ 5.0 Points
The getSession() method with ‘true’ as its parameter [ getSession(true) ] it will return the appropriate session object when A. the session object is passed to another method
B. the session does not exists
C. the session is completed
D. the session is existing
Question 15 of 20
5.0/ 5.0 Points
Which of the following are the session tracking techniques? A. URL rewriting, using servlet object, using response object, using cookies
B. URL rewriting, using request object, using response object, using session object
C. URL rewriting, using session object, using response object, using hidden fields
D. URL rewriting, using session object, using cookies, using hidden fields
Question 16 of 20
5.0/ 5.0 Points
How many ServletContext objects are available for an entire web application? A. Only one
B. One each per response
C. One each per servlet
D. One each per request
Question 17 of 20
5.0/ 5.0 Points
RequestDispatcher object is used A. to include xml object
B. to include an image
C. to include e-mailing response
D. to include other resources
Question 18 of 20
0.0/ 5.0 Points
The values of and in web.xml file A. must be same
B. must not be same
C. may be same
D. None of the above
Question 19 of 20
5.0/ 5.0 Points
What are the mechanisms available in ServletContextListener interface? A. contextInit(), contextService(), contextDestroyed()
B. contextInitialized((),contextDestroyed()
C. contextInitialized(), contextService(), contextDestroyed()
D. None of the above
Question 20 of 20
5.0/ 5.0 Points
To get the servlet environment information A. ServletConfig object is used
B. ServletException object is used
C. ServletContainer object is used
D. ServletContext object is used Part 1 of 2 - Part 1
50.0/ 50.0 Points
Question 1 of 20
5.0/ 5.0 Points
The two primary constituents of JavaBean are A.Directives
B.Properties
C.Methods
D.Scripting Elements
Question 2 of 20
5.0/ 5.0 Points
Which of the following are characteristics of JSP actions? i) The tags are case-sensitive ii) Actions can access, modify and create objects on the current server pages iii) Tags must not have a closing delimiter iv) new actions cannot be built A. i-ii
B. iii-iv
C. ii-iii
D. ii-iv
Question 3 of 20
5.0/ 5.0 Points
The ________________________ when added to the user session tells us that the session timed out. A. SessionTimedoutIndicator
B. SessionTotalTimeOutIndicator
C. SessionTimeoutIndicator
D. SessionTotalTimedoutIndicator
Question 4 of 20
5.0/ 5.0 Points
The ________ represents a generic exception for the JSP packages A. JspException
B. JspError
Question 5 of 20
5.0/ 5.0 Points
URL encoding is the method of replacing all the spaces and other extra characters into their corresponding _______ Characters A. Decimal
B. Binary
C. Hex
D. Octal
Question 6 of 20
Implementing the tag < %@ page isThreadSafe="false" % >implements the SingleThreadModel interface making the Jsp _________________ A. Content safe
B. Synchornised
C. Thread safe
5.0/ 5.0 Points
D. None of the above
Question 7 of 20
5.0/ 5.0 Points
Which of the tag is used to show the comments in the JSP page? A. <%= expressions %>
B. <%-- comment -- %>
C. <% code fragment %>
D. <%! Declarations %>
Question 8 of 20
5.0/ 5.0 Points
The _____ method performs the cleanup of objects created during requests and responses between clients and servers A. Resume()
B. Init()
C. Run()
D. Destroy()
Question 9 of 20
A java bean in a JSP can have which of the following attributes A.Session
B.Page
C.Request
5.0/ 5.0 Points
D.User
5.0/ 5.0 Points
Question 10 of 20
All the ___________ data is kept at the application server ___________ data is kept at the web server A. static, dynamic
B. HTML, Servlet
C. dynamic, static
D. Servlet, HTML
Part 2 of 2 - Part 2
50.0/ 50.0 Points
Question 11 of 20
5.0/ 5.0 Points
What is the disadvantage of Type-4 Native-Protocol Driver? A. Type-4 driver is entirely written in Java
B. It does not support to read MySQL data.
C. The driver converts JDBC calls into vendor-specific database protocol
D. At client side, a separate driver is needed for each database.
Question 12 of 20
The major difference between servlet and CGI is A. Servlets are thread based and CGI is process based
B. Servlets executes slower compared to CGI
5.0/ 5.0 Points
C. Servlet has no platform specific API, where as CGI has
D. All of the above
Question 13 of 20
5.0/ 5.0 Points
The major difference between servlet and CGI is A. Servlets are thread based and CGI is process based
B. Servlets executes slower compared to CGI
C. Servlet has no platform specific API, where as CGI has
D. All of the above
Question 14 of 20
5.0/ 5.0 Points
A deployment descriptor describes A. web component response settings
B. web component settings
C. web component request objects
D. All of the above
Question 15 of 20
A servlet maintain session in A. Servlet response heap
B. Servlet request heap
5.0/ 5.0 Points
C. Servlet container
D. Servlet context
Question 16 of 20
5.0/ 5.0 Points
What are the mechanisms available in ServletContextListener interface? A. contextInit(), contextService(), contextDestroyed()
B. contextInitialized((),contextDestroyed()
C. contextInitialized(), contextService(), contextDestroyed()
D. None of the above
Question 17 of 20
5.0/ 5.0 Points
Which of the following are the session tracking techniques? A. URL rewriting, using servlet object, using response object, using cookies
B. URL rewriting, using request object, using response object, using session object
C. URL rewriting, using session object, using response object, using hidden fields
D. URL rewriting, using session object, using cookies, using hidden fields
Question 18 of 20
5.0/ 5.0 Points
What's the difference between servlets and applets? 1.Servlets executes on Servers, where as Applets executes on Browser 2.Servlets have no GUI, where as an Applet has GUI 3.Servlets creates static web pages, where as Applets creates dynamic web pages 4.Servlets can handle only a single request, where as Applet can handle multiple requests
A. 1,2,3 are correct
B. 1,2 are correct
C. 1,3 are correct
D. 1,2,3,4 are correct
Question 19 of 20
5.0/ 5.0 Points
Which method is used to specify before any lines that uses the PintWriter? A. setResponseType()
B. setPageType()
C. setContextType()
D. setContentType()
Question 20 of 20
5.0/ 5.0 Points
To get the servlet environment information A. ServletConfig object is used
B. ServletException object is used
C. ServletContainer object is used
D. ServletContext object is used
Question 11 of 20
To get the servlet environment information
5.0/ 5.0 Points
A. ServletContainer object is used
B. ServletConfig object is used
C. ServletException object is used
D. ServletContext object is used
Question 12 of 20
5.0/ 5.0 Points
A servlet maintain session in A. Servlet response heap
B. Servlet container
C. Servlet context
D. Servlet request heap
Question 13 of 20
5.0/ 5.0 Points
What's the difference between servlets and applets? 1.Servlets executes on Servers, where as Applets executes on Browser 2.Servlets have no GUI, where as an Applet has GUI 3.Servlets creates static web pages, where as Applets creates dynamic web pages 4.Servlets can handle only a single request, where as Applet can handle multiple requests A. 1,2,3 are correct
B. 1,2 are correct
C. 1,3 are correct
D. 1,2,3,4 are correct
Question 14 of 20
5.0/ 5.0 Points
Dynamic interception of requests and responses to transform the information is done by A. servlet filter
B. servlet container
C. servlet context
D. servlet config
Question 15 of 20
5.0/ 5.0 Points
Servlet mapping defines A. an association between a URL pattern and a servlet
B. an association between a URL pattern and a request page
C. an association between a URL pattern and a response page
D. All of the above
Question 16 of 20
5.0/ 5.0 Points
Which of the following are the session tracking techniques? A. URL rewriting, using session object, using cookies, using hidden fields
B. URL rewriting, using request object, using response object, using session object
C. URL rewriting, using servlet object, using response object, using cookies
D. URL rewriting, using session object, using response object, using hidden fields
Question 17 of 20
5.0/ 5.0 Points
The getSession() method with ‘true’ as its parameter [ getSession(true) ] it will return the appropriate session object when A. the session is existing
B. the session object is passed to another method
C. the session does not exists
D. the session is completed
Question 18 of 20
5.0/ 5.0 Points
A deployment descriptor describes A. web component response settings
B. web component settings
C. web component request objects
D. All of the above
Question 19 of 20
5.0/ 5.0 Points
RequestDispatcher object is used A. to include other resources
B. to include an image
C. to include xml object
D. to include e-mailing response
Question 20 of 20
5.0/ 5.0 Points
The major difference between servlet and CGI is A. Servlets are thread based and CGI is process based ervlets are thread based and CGI is process based B. Servlets executes slower compared to CGI
C. Servlet has no platform specific API, where as CGI has
D. All of the above