Enterprise Java MCQs with Answers Set 2

Enterprise Java Questions and Answers Set 2


Set 1           Set 2           Set 3

Questions 11 to 20


11. Which of the following is not true for servlet?        

(a) It is persistent
(b) Platform independent
(c) High performance
(d) It is multi threaded
(e) It is single threaded.

12. Which JSP tag is used to transfer processing to another JSP page?  

(a) <jsp:include> 
(b) <jsp:forward> 
(c) <jsp:redirect> 
(d) <jsp:useBean>
(e) <jsp:use:include>.

13. Which of the following is an approach for state maintenance in Web applications?          
                                               
(a) Hidden Form Field
(b) URL Rewriting
(c) Cookies
(d) HTTP Session
(e) All of the above.

14. Which of the following are not a container for EJB?       

I. Internet Information Server.
II. Java System Application Server. 
III. Tomcat.
IV. WebLogic.
(a) Both (I) and (II) above 
(b) Both (II) and (III) above 
(c) Both (III) and (IV) above 
(d) Both (I) and (IV) above 
(e) Both (I) and (III) above.

15. Which EJB usually represents persistent data?                  

(a) Entity Bean
(b) Stateless Session Bean 
(c) Stateful Session Bean 
(d) Message-Driven Bean
(e) Static Bean.

16. Which is least visibility scope for Java bean in JSP?               

(a) Page
(b) Session
(c) Request
(d) Application
(e) Global.

17. Which of the following is/are true for JSP technology?        

I. It is persistent.
II. Platform independent.
III. Browser executes the code.

(a) Only (I) above
(b) Only (II) above
(c) Both (I) and (II) above
(d) Both (II) and (III) above
(e) All (I), (II) and (III) above.

18. Which of the following is true for JNDI?             

(a) Database service
(b) Naming and Directory Service
(c) Network Service
(d) Web Service
(e) XML Service.

19. Which method of the request object is used to extract values of the input fields in a form when it is submitted?            

(a) getParameter
(b) getParameterNames
(c) getValues
(d) putValues
(e) getParameters.

20. Which of the following is true for CORBA?            

(a) Protocol for distributed computing
(b) Database specification
(c) Specification for distributed objects
(d) Components can be language neutral
(e) Both (c) and (d) above.

Answers and Explanation 

           Ans                   Explanation


11.         E       Servlet is not single threaded.


12.         B       <jsp:forward> is used to transfer processing to another jsp page.

13.         E       All the approaches are used for state maintenance in Web applications

14.         E       Internet information server and tomcat are not container for EJB.

15.         A       Entity bean usually represents persistent data.

16.         A       Page is least visbility scope for java bean in jsp.

17.         C       jsp technology is persistent and platform independent.

18.         B       jNDI is naming and directory service.

19.         A       Get parameter is usedto extract values of the input fields in a form

20.         E       Both a and b are contradicting.



3 comments :

  1. Java Servlet Interview Questions and Answers
    http://allinterviewquestionsandanswerspdf.blogspot.in/2016/06/top-25-java-servlet-interview-questions.html

    ReplyDelete
  2. clients do not have direct access to EJBs, they can only access them through the _______?
    a)JMS
    b)QUEUE
    c)Topic
    d)Container

    ReplyDelete
  3. clients do not have direct access to EJBs, they can only access them through the _______?
    a)JMS
    b)QUEUE
    c)Topic
    d)Container

    ReplyDelete