0% found this document useful (0 votes)
166 views

Assessment Sheet J2Ee: 4. Which of The Following Represents A Correct Syntax For Usebean

The document contains an assessment sheet with 15 multiple choice questions testing knowledge of key Java EE concepts like JSP implicit objects, servlet life cycle, servlet configuration, EJB session beans, and asynchronous messaging. The questions cover topics such as valid JSP implicit variables, maintaining state across requests, servlet initialization parameters, usebean syntax, servlet class file location, the MVC pattern as it relates to servlets, servlet life cycle methods, and EJB packaging, session types, annotations, and life cycle states.

Uploaded by

rguptamtech
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views

Assessment Sheet J2Ee: 4. Which of The Following Represents A Correct Syntax For Usebean

The document contains an assessment sheet with 15 multiple choice questions testing knowledge of key Java EE concepts like JSP implicit objects, servlet life cycle, servlet configuration, EJB session beans, and asynchronous messaging. The questions cover topics such as valid JSP implicit variables, maintaining state across requests, servlet initialization parameters, usebean syntax, servlet class file location, the MVC pattern as it relates to servlets, servlet life cycle methods, and EJB packaging, session types, annotations, and life cycle states.

Uploaded by

rguptamtech
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 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
d. All of above

6. Compiled servlet classes must be stored in this folder


a) WEB-INF
b) Classes
c) Servlet
d) Webcontent
7. As per MVC, servlet must act like a:-
a. Model
b. Controller
c. view
d. 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 cycle

b. service() method is called for each client

c. servlet could have parameterized constructor

d. none of these

9. ServletConfig is per servlet

a. True

b. False

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

a. True

b. False

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

a. True

b. False

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

a. True

b. False

13. Packaging unit of EJB is

a. .jar

b. .war
c. .ear

d. .aar

14. For Asynchronous messaging we have

a. Session bean

b. message driven bean

c. Entity bean

d. none of the above

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

a. Time out

b. Shut down the server

c. Both

d. none of the above

You might also like