Sie sind auf Seite 1von 26

1. Why might you give an input component in an HTML form both a name and an id attribute? A.

:-) To apply a label and send data to the server B. X To apply two different labels C. X To send the values of multiple radio buttons to the server D. ? There is no point is using both a name and an id attribute

2. Which of the following elements may NOT be used as part of a HTML table element? A. B. ? td ? th

C. :-) heading D. ? caption

3. Which one of the following statements about static web pages is TRUE? A. ? Static web pages use JavaScript to process user events and update themselves.

B. :-) Static web pages are implemented as XHTML files. C. D. ? Static web pages always execute on the server. ? Static web pages are implemented as JSPs.

4. Which one of the following statements about JavaBeans is TRUE? A. ? A servlet is a type of JavaBean

B. :-) JavaBeans have properties

C. X JavaBeans and JSPs cannot be used together D. ? JavaBeans appear in JSP model 1 but not JSP model 2

5. Which one of the following statements is TRUE? A. :-) JSPs are converted to servlets by the servers JSP engine. B. C. ? JDBC is a Java API that is used to dynamically generate web pages. ? JavaScript is a subset of the Java programming language that enables inexperienced programmers to program in Java.

D. X JavaScript is a Java API that is used to dynamically generate web pages.

6. Which of the following CSS color styles would set the foreground text color to green? A. B. ? color: rgb(255,255,255) ? color: rgb(255,0,0)

C. :-) color: rgb(0,255,0) D. ? color: rgb(0,0,255)

7. What is Struts? A. :-) A web framework B. C. D. ? A persistence framework ? A design pattern ? An zcronym

8. What type of Struts object is used to gather data from a form?

A. :-) ActionForm B. C. D. ? Action ? ActionServlet ? Struts-Config

9. Which of the following is NOT part of the Tomcat application server? A. ? Catalina

B. X Jasper C. :-) JBoss D. ? Coyote

What are the important components of struts? 1. Action Servlet 2. Action Classes 3. Action Form 4. Validator Framework 5. Message Resources 6. Struts Configuration XML Files 7. View components like JSP Question 1: Which of the following genres does Apache Struts produce? JavaServer Faces Web server Web application framework

Web development

quiz-infobox-dev

Apache_Struts-4

Question 2: Who developed Apache Struts? Python Software Foundation From Software Apache Software Foundation Pipeworks Software

Question 3: What was Apache Struts written in? Perl Free Pascal PHP Java (programming language)

quiz-infobox-prog Apache_Struts-4

quiz-infobox-ope

Apache_Struts-4

Question 4: Which of the following platforms does Apache Struts run on? Berkeley Software Distribution Linux

.NET Framework Cross-platform

quiz-infobox-licen Apache_Struts-3

Question 5: What license is Apache Struts distributed under? Copyright u00A9 1979 Atari Inc. Proprietary commercial Apache License 2.0 Apache License v2.0

quiz

quiz Apache_Stru

Question 6: In 2004 Sun launched an addition to the Java platform, called ________ (JSF). Backbase JavaServer Faces Apache Struts OpenXava

quiz

quiz Apache_Stru

Question 7: The new ________ standards and frameworks may also be another option to building complex web Form validations with Struts in the future. Scalable Vector Graphics XForms Cascading Style Sheets XMLHttpRequest

quiz

quiz Apache_Stru

Question 8: Apache Struts is an open-source web application framework for developing ________ web applications. Java Platform, Standard Edition Java (software platform) Java (programming

language)

Java Platform, Enterprise Edition

quiz

quiz Apache_Stru

Question 9: Other MVC frameworks that are Java based include WebObjects and ________. Grails (framework) Spring Framework Dojo Toolkit Ruby on Rails

quiz

quiz Apache_Stru

Question 10: It uses and extends the ________ API to encourage developers to adopt a model-view-controller (MVC) architecture. Java (programming language) Servlet 5 JavaServer Pages Java (software platform) Java

Your Answer Question Which one is correct? 1 Your public ActionForward execute(ActionMapping mapping, Answer ActionForm form,HttpServletRequest request, HttpServletResponse response) Correct Answer Question Struts framework is use following servlet? 7 Your ActionServlet Answer Correct Answer Question Can multiple struts-config.xml present in one web 8 application? Your Can be present Answer Correct Answer Question Can ActionServlet be loaded using <Load-on-startup>?

The class instantiates ActionForm and puts it in appropriate scope based on scope tag RequestProcessor

10 Your Yes Answer Correct Answer 14 How to triger validate() method of ActionForm? Your validate="true" Answer Correct Answer Question 17 Your Answer Correct Which class instantiates the Action class specified in the ActionMapping and invokes the execute() method? RequestProcessor Answer

Question In validate method of ActionForm , Parameters are? 19 Your ActionMapping mapping,HttpServletRequest request Answer Correct Answer Question In which file you have to add TilesPlugin to use tiles in 21 struts? Your Struts-config.xml Answer Correct Answer Question In which file you have to add TilesPlugin to use tiles in 31 struts? Your Struts-config.xml Answer Correct Answer Question If validate="false" in struts-config.xml action tag? 32 Your Validate() method of ActionForm Not Called automatically Answer Correct Answer Question Can there be multiple inside ? 34 Your can't be Answer Correct Answer

Question 36 Your Answer Correct Question 37 Your Answer Correct

Which file contains java script for client side validation using validation framework in struts? validator-rules.xml Answer Correct validate() method? public ActionErrors validate(ActionMapping mapping,HttpServletRequest request) Answer

Question RequestProcessor is based on following design pattern? 39 Your TemplateMethod Design Pattern Answer Correct Answer Question 1 Your Answer Correct Why beans are used in J2EE architecture instead of writing all the code in JSPs? Allows separation of roles between web developers and application developers Answer

Question What is legal about JSP scriplets 2 Your All the above Answer Correct Answer Question 6 Your Answer Correct Which method is called first each time a Servlet is invoked? init() Answer

Question How can a Servlet call a JSP error page? 7 Your The servlet needs to forward the request to the specific error Answer page URL. The exception is passed along as an attribute named "javax.servlet.jsp.jspException".

Correct Answer Question 10 Your Answer Correct In JSP, how can you know what HTTP method (GET or POST) is used by client request ? by using request.getMethod() Answer

Question What is the sequence of method execution in Filter? 12 Your init,doFilter,destroy Answer Correct Answer In validate method of ActionForm , Parameters are?

HttpServletRequest request, HttpServletResponse response

HttpServletRequest request,ActionMapping mapping

ActionMapping mapping,HttpServletRequest request

ActionMapping mapping,HttpServletResponse response

To Enable Message Resource in struts application? <message-resources> tag add to web.xml <message-resources> tag add to Struts-config.xml <message-resources> tag add to properties file. none of the above

Which is correct execute method of Action class?

public void execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException

public ActionForward execute (ActionMapping mapping, ActionForm form, ServletRequest request, ServletResponse response) throws Exception

public ActionForward execute (ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception

public ActionForward execute (ActionMapping mapping, ActionForm form, ServletRequest request, ServletResponse response) throws SevletException, IO Exception Which tag library Struts does not support ?

logic

bean

html

jsp

Correct sequence of ActionForm execution?

setter,reset

Initialization,setter,reset

setter,reset,Initialization

reset,Initialization,setter Can multiple struts-config.xml present in one web application?

Can be present

Can't be present

none

Can there be multiple inside ?

may be

can't be

None of the above What does validate() method of ActionForm returns?

ActionErrors

ActionForward

ActionMapping

ActionError How to triger validate() method of ActionForm?

validate="false"

validate="true"

validate="yes"

validate="no In which file you have to add TilesPlugin to use tiles in struts?

Web.xml

Struts-config.xml

Properties file

None of the above

If validate="false" in struts-config.xml action tag?

Validate() method of ActionForm called automatically

Validate() method of Action called automatically

Validate() method of ActionForm Not Called automatically

None Of the above

To defeating browser cache?

nocache=true

nocacherequired=false

cache=false

none

reset() method signature in ActionForm?

public void reset(ActionMapping mapping, HttpServletRequest request)

public ActionErrors reset(ActionMapping mapping, HttpServletRequest request)

public ActionError reset(ActionMapping mapping, HttpServletRequest request)

None of the above Which is correct statement to link different module i.e. moduleB

<html:link module="moduleB" path="/index.do"/>

<html:link redirect="moduleB" path="/index.do"/>

<html:link path="moduleB/index.do"/>

<html:link path="/index.do" link=?moduleB?/> Which is the correct configuration initialize parameter for Foo module?

<init-param><paramname>config/Foo</param-name><paramvalue>/WEB-INF/struts-foo.xml</paramvalue></init-param>

<init-param><paramname>config/module/Foo</paramname><param-value>/WEB-INF/strutsfoo.xml</param-value></init-param>

<init-param><paramname>config/Foo/module</paramname><param-value>/WEB-INF/strutsfoo.xml</param-value></init-param>

Can multiple struts-config.xml present in one web application?

Can be present

Can't be present

Can there be multiple <definition> tag inside <tiles-definitions> tag in tilesdefs.xml?

yes

no

Which class checks for the validate attribute in the ActionMapping. And If the validate is set to true, invokes the validate() method of the ActionForm instance?

ActionMapping

RequestProcessor

ActionServlet

action

In which file you have to add TilesPlugin to use tiles in struts?

Web.xml

Struts-config.xml

Properties file

none

What does validate() method of ActionForm returns?

ActionErrors

ActionForward

ActionMapping

ActionError

Org.apache.struts.action.Action class extends?

Object class

Action Servlet

Http Servlet

reset() method of ActionForm return

ActionErrors

ActionError

void

ActionMapping

execute() method of org.apache.struts.action.Action class returns?

ActionMapping

ActionError

ActionForward

ActionForm

reset() method signature in ActionForm?

public void reset(ActionMapping mapping, HttpServletRequest request)

public ActionErrors reset(ActionMapping mapping, HttpServletRequest request)

public ActionError reset(ActionMapping mapping, HttpServletRequest request)

Is ActionForm serializable?

true

false

both 1 and 2

None of the above

Can there be multiple inside ?

may be

can't be

None of the above

Which is correct statement to link different module i.e. moduleB

<html:link module="moduleB" path="/index.do"/>

<html:link redirect="moduleB" path="/index.do"/>

<html:link path="moduleB/index.do"/>

What are the scopes available in struts?

Session , request

Page, request,session

Page, request,session,application

request,session,application

To defeating browser cache which control is set to nocache=true?

TileRequestProcessor

ActionController

RequestController

ActionProcessor

Which file contains java script for client side validation using validation framework in struts?

validation.xml

validator-rules.xml

both files

None

Can there be multiple <tiles-definitions> tag in tiles-defs.xml?

No

Yes

always present

None of the above

Struts framework is use following servlet?

BasicServlet

EntryServlet

ActionServlet

StrutsServlet

Das könnte Ihnen auch gefallen