You are on page 1of 13

1)Which is not subclass of DispatchAction class? A: MappingDispatchAction B: MethodDispatchAction C: EventDispatchAction D:LookUpDispatchAction ANS)B 2)Correct sequence of ActionForm execution?

A:setter,reset B:Initialization,setter,reset. C:setter,reset,Initialization D:reset,Initialization,setter ANS)B 3)What does validate() method of ActionForm returns? A:ActionErrors. B:ActionForward C:ActionMapping ANS)A 4)Can multiple struts-config.xml present in one web application? A:Can be present. B:Can't be present C:None ANS)A 5)Which class instantiates the Action class specified in the ActionMapping and i nvokes the execute() method? A:ActionMapping B:RequestProcessor. C:ActionServlet D:Action ANS)B 6)what does hibernate.hbm2ddl.auto create this means? A:create tables. automatically. B:create session object automatically C:create Sessio Factory object automatically D:None ANS)A 7)How hbm.xml file include other hbm.xml files? A;<mapping resource="activity.hbm.xml"/> B:<include resource="activity.hbm.xml"/> C:<add resource="activity.hbm.xml"/> D:None ANS)A

8)It is possible to declare mappings for multiple classes in one mapping file? A:true. B:false C:can't say D:none of the above ANS)A 9)Which statement is correct about session.load()? A:load() will throw an unrecoverable exception if there is no matching d atabase row. B:load() will return null if there is no matching database row C:None of the above ANS)A

10. Struts framework is based on A:Servlet, JSP and Java B:Servlet, HTML and Java c:Servlet, JSP, XML and Java. D:Applet, XML and Java Ans:C 11. ActionServlet, RequestProcessor and Action classes are the components of A:View B:Model C:Deployment D:Controller. Ans:D 12. Which of the following is performed by ActionServlet and RequestProcessor? 1.Receiving the HttpServletRequest 2.Populating JavaBean from the request parameters 3.Displaying response on the web page Issues. 4.Content type issues handling 5.Provide extension points a.123 b.1432 c.1245 d.234 Ans:C

13. How many instances can be created per application module by the RequestProce ssor class? A:Four B:Three C:One. D:Uncountable instances Ans:C 14. An instance of Action is invoked by A:ActionServlet B:ActionListener C:RequestProcessor. D:All of the above Ans:C 15. Application module selection is done by A:Action class B:ActionServlet. C:RequestProcessor D:All of the above Ans:B 16. Which of the following methods is overridden by Action class? A:execute(). B:service() C:run() D:destroy() Ans:A 17. Which of the following should always forwards or redirect to a resource (vie w) after completed? A:HttpResponse object. B:ActionServlet C:Action class D:Request Processor Ans:A 18. What is the limitation of creating ActionServlet instances per web applicati on? A:Two B:Three C:Unlimited D:One. Ans:D 19. Struts framework

A:should always decouple the application from a specific model implement ation B:provides model components C:does not support JavaBeans and EJB D:has built-in support for the model Ans:A 20. The dispatch from the controller to the Action class is based on a configura tion that is provided by a A:struts-configs.xml B:struts-action-config.xml C:struts-processor-conifg.xml D:struts-config.xml Ans:D 21. Which of the following tags in struts-config.xml file defines the availabili ty of necessary Struts JSP custom tag libraries? A:< B:< C:< D:< Ans:c jsp-lib> struts-taglib> taglib> jsp-taglib

22. Struts framework A:should always decouple the application from a specific model implementation B:provides model components C:does not support JavaBeans and EJB D:has built-in support for the model ans:a 23.The dispatch from the controller to the Action class is based on a configurat ion that is provided by a A:struts-configs.xml B:struts-action-config.xml C:struts-processor-conifg.xml D:struts-config.xml ans:d 24. Which of the following tags in struts-config.xml file defines the availabili ty of necessary Struts JSP custom tag libraries? A:< jsp-lib> B:< struts-taglib>

C:< taglib> D:< jsp-taglib> ans: c 25. Which tag is used along with uri, to specify the tiles framework s .tld file? A:< %@taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%> B:< %@taglib url="/WEB-INF/tile.tld" prefix="tiles"%> C:< %@taglibs uri="/WEB-INF/tiles.tld" prefix="tiles"%> D:< %@taglib uri="/WEB-INF/tlds/tiles.tld" prefix="tiles"%>

ans:a 26. Application module selection is done by A:Action class B:ActionServlet C:RequestProcessor D:All of the above ans: b 27what is ORM? A:object B:object C:object D:object ans:a 28which one is ORM tool? A:struts B:hibernate C:java D:php ans:b 29Hibernate is implemented by using ? A:java class B:POJO C:action class D:XML ans:b 30Which is the configuration file in hibernate? A:hibernate.cfg.xml relational mapping related map relational map related mapping

B:.hbm.xml C:struts,xml D:web.xml ans:a 31 delaying the object creation or calculating a value or some process until the first time it is needed. The retrieval of particular information only at the ti me when the object is accessed is called as? A:mapping B:abstraction C:normalisation D:lazy initialization ans:b

32:Can multiple struts-config.xml present in one web application? a)Can be present b)Can't be present c)None Ans)a 33:Can there be multiple <definition> tag inside <tiles-definitions> tag in tile s-defs.xml? a)yes b)no Ans)a 34:What are the scopes available in struts? a)Session , request b)Page, request,session c)Page, request,session,application d)request,session,application Ans)a 35:Org.apache.struts.action.Action class extends? a)Object class b)Action Servlet c)Http Servlet d)none Ans)a 36:Which of the tag is present in struts.xml? a)action b)web-apps c)session-factory Ans)a

37.How hibernateconfg.xml file include other hbm.xml files? a)<mapping resource="activity.hbm.xml"/> b)<include resource="activity.hbm.xml"/> c)<add resource="activity.hbm.xml"/> d)None Ans)a 38.Employee emp = session.load(Employee .class); session.close(); Is Employee object available to access ? a)Yes b)No Ans)b 39.It is possible to declare mappings for multiple classes in one mapping file? a)true b)false Ans)a 40.Is Hibernate Session threadsafe? a)yes b)no c)no relation with thread Ans)a 41.what does hibernate.hbm2ddl.auto create this means? a)create tables automatically b)create session object automatically c)create Sessio Factory object automatically d)None Ans)a

42. Which of the following methods is overridden by Action class? A:execute() B:service() C:run() D:destroy() ans:a

43. Which of the following should always forwards or redirect to a resource (vie w) after completed? A:HttpResponse object

B:ActionServlet C:Action class D:Request Processor ans: a

44. Which of the following acts as a bridge between user-invoked URI and a busin ess method? A:HttpRequest B:Action class C:ActionServlet D:RequestProcessor ans: b 45. What is the limitation of creating ActionServlet instances per web applicati on? A:Two B:Three C:Unlimited D:One ans:d

46:What is HQL? A:hibernate Query language B:hibos Query language C:hiber Query language ans:a 47:What is sessionfactory? A:Interface B:class C:Abstract class ans:a 48:method throws an exception,when the unique id could not found in the database .................. A:get() B:load() ans:b 49:what is JDBC A:java database connectivity B:java database connection C:jsp database connection

ans:a 50:What is advantages of hibernate over jdbc?? A:flexible B:simplicity C:complicated D:not flexible ans:a

(51)Which tag library Struts does not support ? (A)logic (B)bean (C)html (D)jsp ans:B (52)Which of the following methods is overridden by Action class? (A)execute() (B)service() (C)run() (D)destroy() ans:A (53)The dispatch from the controller to the Action class is based on a configura tion that is provided by a (A)struts.xml (B)struts-action-config.xml (C)struts-processor-conifg.xml (D)struts-config.xml ans:B (54)Which of the following acts as a bridge between user-invoked URI and a busin ess method? (A)HttpRequest (B)Action class (C)ActionServlet (D)RequestProcessor ans:D (55)How hibernateconfg.xml file include other hbm.xml files? (A)<mapping resource="activity.hbm.xml"/> (B)<include resource="activity.hbm.xml"/>

(C)<add resource="activity.hbm.xml"/> (D)None ans:A (56)Employee emp = session.load(Employee .class); session.close(); Is Employee object available to access ? A)Yes B)No: ans:B (57)It is possible to declare mappings for multiple classes in one mapping file? A)true B)false ans:A (58)Is Hibernate Session threadsafe? A)yes B)no C)no relation with thread ans:A (59)what A)create B)create C)create D)None ans:A 60). How to display errors in jsp page ? (A) <bean:error /> (B) <html:error /> (C)<error:error /> (D) <html:errors /> ans:D does hibernate.hbm2ddl.auto create this means? tables automatically session object automatically Sessio Factory object automatically

61.Is Hibernate Session threadsafe? A:yes B:no C:no relation with thread D:none

ans:a 62.what does hibernate.hbm2ddl.auto create this means? a.create tables automatically b.create session object automatically c.create Session Factory object automatically d.None ans:a 63.Load child object automatically when parent object is loaded? a.lazy=yes b.lazy=fasle c.lazy=true d.lazy=no ans:c 64.How can get a session object ? a.SessionFactory.getSession(); b.SessionFactory.openSession(); c.SessionFactory.get(); d.(session)SessionFactory.getObject(); ans:b 65.How can you make a property be read from the database but not modified in any way? a.By using the insert="false" and update="false" attributes. b.By using the isinsert="false" and isupdate="false" attributes. c.By using the isinsert="no" and isupdate="no" attributes. d.None ans:a

66. Which tag is used along with uri, to specify the tiles framework s .tld file? a.< %@taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%> b.< %@taglib url="/WEB-INF/tile.tld" prefix="tiles"%> c.< %@taglibs uri="/WEB-INF/tiles.tld" prefix="tiles"%> d.< %@taglib uri="/WEB-INF/tlds/tiles.tld" prefix="tiles"%> ans:a 67. To specify a form-bean of dynamic validation form, which of the following is used in <form-bean> tag a.type="org.apache.struts.validator.DynaValidationForm" b.type="org.apache.struts.validator.DynaValidatorForm" c.type="org.apache.struts.validator.DynaValidateForm" d.type="org.apache.struts.validator.DynaValid Form ans:b 68. Which of the following tag is a valid form submission in Struts framework? [ some-action.do is a sample] a.< html:page-form action="/some-action.do"> b.< jsp:webform action="/some-action.do"> c.< html:web-form action="/some-action.do"> d< html:form action="/some-action.do"> ans:d 69. Which of the logic tags is used for repetitive output generation? a.< logic:lessThan> b.< login:redirect> c.< logic:iterate> d.< logic:loop> ans:c 70. Which of the java bean tags is used to show the bean value on the web page? a.< bean:define> b.< bean:message>

c.< bean:show> d.< bean:write> ans:d

You might also like