Q.1
Which method stores the input data in the request body of the clients HTTP request
  • POST
  • GET
  • form
  • HTML
Q.2
Which method is used to delete a session?
  • invalidateSession()
  • invalidate()
  • deleteSession()
  • delete()
Q.3
If the client has disabled cookie in the browser, which session management mechanism could the web container employ ?
  • Session Management using Cookies
  • Session Management using URL rewriting
  • Either Cookies or URL rewriting
  • Cookies and URL rewriting must be used together
Q.4
<%@page attribute= %>In above statement attribute may be
  • include
  • import
  • session
  • all the above
Q.5
Which statement about HttpSession is not true?
  • HttpSession object is used to store entire session with a specific client
  • Any servlet can have access to HttpSession object through the getSession() method
  • A session will become invalid as soon as the user close all the browser window
  • Attribute can be stored, retrieved and removed from HttpSession object
Q.6
Which method is used access the cookies that are added to response object?
  • getCookies()
  • getNewCookies();
  • cookies();
  • returnCookies();
Q.7
Cookies are stored on _______ side.
  • Client
  • Server
  • database
  • none
Q.8
Given request is an HttpServletRequest, which code snippets will creates a session if one doesn't exist?
  • request.getSession(false);
  • request.createSession();
  • request.getNewSession();
  • request.getSession();
Q.9
When the Web Container initializes a servlet, it creates a ___________ object for the servlet ?
  • ServletConfig
  • ServletInit
  • ServletContext
  • None of the above
0 h : 0 m : 1 s