J2Ee Technologies Set 3
On This Page
This set of J2EE Technologies Multiple Choice Questions & Answers (MCQs) focuses on J2Ee Technologies Set 3
Q1 | Which of the following is true about servlets?
- Servlets execute within the address space of web server
- Servlets are platform-independent because they are written in java
- Servlets can use the full functionality of the Java class libraries
- Servlets execute within the address space of web server, platform independent and uses the functionality of java class libraries
Q2 | Which method is used to specify before any lines that uses the PrintWriter?
Q3 | Which of the following are the session tracking techniques?
- URL rewriting, using session object, using response object, using hidden fields
- URL rewriting, using session object, using cookies, using hidden fields
- URL rewriting, using servlet object, using response object, using cookies
- URL rewriting, using request object, using response object, using session object
Q4 | The getSession() method with „true? as its parameter [ getSession(true) ] it will return the appropriate session object when
- the session is completed
- the session object is passed to another method
- the session does not exists
- the session is existing
Q5 | A servlet maintain session in
- Servlet container
- Servlet context
- Servlet request heap
- Servlet response heap
Q6 | Servlet mapping defines
- an association between a URL pattern and a servlet
- an association between a URL pattern and a request page
- an association between a URL pattern and a response page
- All of the above
Q7 | The life cycle of a servlet is managed by
- servlet context
- servlet container
- the supporting protocol (such as http or https)
- all of the above
Q8 | The init parameter name and value pairs that are defined in web.xml file are handled by
- ServletConfig object
- ServletContext object
- ServletRequest object
- ServletResponse object
Q9 | How many ServletContext objects are available for an entire web application?
- One each per servlet
- One each per request
- One each per response
- Only one
Q10 | Which of the following package contains servlet classes?
- Both of the above
- None of the above
Q11 | Which page directive should be used in JSP to generate a PDF page?
Q12 | Which tag should be used to pass information from JSP to included JSP?
- Using <%jsp:page> tag
- Using <%jsp:param> tag
- Using <%jsp:import> tag
- Using <%jsp:useBean> tag
Q13 | Application is instance of which class?
Q14 | _jspService() method of HttpJspPage class should not be overridden.
Q15 | Which option is true about session scope?
- Objects are accessible only from the page in which they are created
- Objects are accessible only from the pages which are in same session
- Objects are accessible only from the pages which are processing the same request
- Objects are accessible only from the pages which reside in same application
Q16 | Default value of autoFlush attribute is?
Q17 | Which one is the correct order of phases in JSP life cycle?
- Initialization, Cleanup, Compilation, Execution
- Initialization, Compilation, Cleanup, Execution
- Compilation, Initialization, Execution, Cleanup
- Cleanup, Compilation, Initialization, Execution
Q18 | “request” is instance of which one of the following classes?
Q19 | Which is not a directive?
Q20 | Which is mandatory in tag?
- id, class
- id, type
- type, property
Q21 | Which one of the following is correct for directive in JSP?
Q22 | Which of the following action variable is used to include a file in JSP?
Q23 | Which attribute uniquely identification element?
Q24 | “out” is implicit object of which class?
Q25 | Which object stores references to the request and response objects?