final j2ee

3
ASSESSMENT SHEET J2EE Name: ……………………………………… Date: …………………… 1. Which are valid JSP implicit variables? (Choose all that apply.) A. stream B. context C. exception D. listener E. application 2. To send text outptut in a response, the following method of HttpServletResponse may be used to get the appropriate Writer/Stream object. Select the one correct answer. a. getStream b. getOutputStream c. getBinaryStream d. getWriter 3. Servlet initialization paramenters for a servlet should be stored in a. Any xml file b. Web.xml c. Server.xml d. configxml 4. Which of the following represents a correct syntax for usebean. a. <jsp:usebean id="fruit scope ="page"/> b. <jsp:usebean id="fruit type ="String"/> c. <jsp:usebean id="fruit type ="String" beanName="Fruit"/> d. <jsp:usebean id="fruit class="Fruit" beanName="Fruit"/> 5. We could maintain state of client across multiple request using:- a. Application object b. Session object c. Request object

Upload: rguptamtech

Post on 10-Apr-2015

11 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Final J2EE

ASSESSMENT SHEET

J2EE

Name: ……………………………………… Date: ……………………

1. Which are valid JSP implicit variables? (Choose all that apply.)

A. stream

B. context

C. exception

D. listener

E. application

2. To send text outptut in a response, the following method of HttpServletResponse may be used to get the appropriate Writer/Stream object. Select the one correct answer.

a. getStreamb. getOutputStreamc. getBinaryStreamd. getWriter

3. Servlet initialization paramenters for a servlet should be stored in a. Any xml fileb. Web.xmlc. Server.xmld. configxml

4. Which of the following represents a correct syntax for usebean.

a. <jsp:usebean id="fruit scope ="page"/> b. <jsp:usebean id="fruit type ="String"/> c. <jsp:usebean id="fruit type ="String" beanName="Fruit"/> d. <jsp:usebean id="fruit class="Fruit" beanName="Fruit"/>

5. We could maintain state of client across multiple request using:-a. Application objectb. Session objectc. Request objectd. All of above

6. Compiled servlet classes must be stored in this folder a) WEB-INFb) Classesc) Servletd) Webcontent

Page 2: Final J2EE

7. As per MVC, servlet must act like a:-a. Modelb. Controllerc. viewd. None of the above

8. Which of the following statement is not true about servlet life cycle:-a. init() is only once called in servlet life cycleb. service() method is called for each clientc. servlet could have parameterized constructord. none of these

9. ServletConfig is per servlet a. Trueb. False

10. Total number of hits to the web-application can be maintained in Session Objecta. Trueb. False

11. EJB 3.0 contain three type of session bean ie Statefull, Stateless and message driven bean

a. Trueb. False

12. @local annotation is used to mention local session bean:-a. Trueb. False

13. Packaging unit of EJB is a. .jarb. .warc. .eard. .aar

14. For Asynchronous messaging we havea. Session beanb. message driven beanc. Entity beand. none of the above

15. During life cycle of stateless bean, bean transit from ready to does not exist state because of

a. Time outb. Shut down the serverc. Bothd. none of the above