Apache Struts Framework Quiz

Test your knowledge of Apache Struts framework, covering ActionForm, RequestProcessor, Tiles, and Struts configuration concepts

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Can there be multiple tag inside tag in tiles-defs.xml?

  1. yes
  2. no
  3. None of the above
  4. It Depends.
Question 2 Multiple Choice (Single Answer)

If you have created a custom ActionMapping subclass with the property "service", you can initialize the value to "selectRecord" using

  1. <init-property name="service" value="selectRecord"/>
  2. <set-property property="service" value="selectRecord"/>
  3. <put-field key="service" content="selectRecord"/>
  4. None of Above
Question 3 Multiple Choice (Single Answer)

In Struts 1.1, you can change how Struts populates a form by

  1. Overriding the populate method of the ActionForm
  2. Overriding the processPopulate method of the Request Processor
  3. Overriding the populateBean method of the ActionMapping
  4. All of Above
Question 4 Multiple Choice (Single Answer)

We can create how many struts config file in an struts application?

  1. Only One
  2. Only Two
  3. Zero
  4. As many we needed
Question 5 Multiple Choice (Single Answer)

Which one is correct?

  1. <actionpath="/r4r" type="org.apache.struts.webapp.example.EditSubscriptionAction" name="r4rForm" scope="request" validate="false"> <forward name="failure" path="/index.jsp"/> <forward name="success" path="/admin.jsp"/> </action>
  2. .<action classpath="/r4r" type="org.apache.struts.webapp.example.EditSubscriptionAction" name="r4rForm" scope="request" validate="false"> <forward name="failure" path="/index.jsp"/> <forward name="success" path="/admin.jsp"/> </action
  3. <action path="/r4r" type="org.apache.struts.webapp.example.EditSubscriptionAction" id="r4rForm" scope="request" validate="false"> <forward name="failure" path="/index.jsp"/> <forward name="success" path="/admin.jsp"/> </action>
  4. None
Question 6 Multiple Choice (Single Answer)

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

  1. Object class
  2. Action Servlet
  3. Http Servlet
  4. None Of the above
Question 7 Multiple Choice (Single Answer)

ReuestProcessor is based on following design pattern?

  1. Command Design Pattern
  2. Template Method Design Pattern
  3. Prototype Design Pattern
  4. Singleton Design Pattern
Question 8 Multiple Choice (Single Answer)

What is struts?

  1. A Technology
  2. A Frameworks
  3. A Java Development Tool Kit
  4. A Language.
Question 9 Multiple Choice (Single Answer)

Each Struts Action element is uniquely identified by its

  1. Input attribute
  2. Name attribute
  3. Page attribute
  4. Path attribute
Question 10 Multiple Choice (Single Answer)

From a MVC perspective, Struts provides the

  1. Model
  2. View
  3. Controller
  4. None of Above
Question 11 Multiple Choice (Single Answer)

The name of the Application Resources file is set by the servlet init-param named

  1. application
  2. resources
  3. ApplicationResources
  4. Messages
Question 12 Multiple Choice (Single Answer)

The bean:write tag is:

  1. Always converts HTML markup to entity equivalents, like <
  2. Never converts HTML markup to entity equivalents
  3. Converts markup when filter=true
  4. Converts markup when markup=false
Question 13 Multiple Choice (Single Answer)

To localize Tiles, you can

  1. Create separate configuration files for each locale
  2. Specify an locale for a definition
  3. Either A or B
  4. None of Above
Question 14 Multiple Choice (Single Answer)

What is return type of execute () method?

  1. void
  2. String
  3. ActionForward
  4. ActionMapping
Question 15 Multiple Choice (Single Answer)

How to use ReuestDispatcher to redirect URL ?

  1. <forward name="Success" path="/action/xys" />
  2. <forward name="Success" path="/action/xys" redirect=?true? />
  3. <forward name="Success" path="/action/xys" redirect="yes" />
  4. None of the above
Question 16 Multiple Choice (Single Answer)

If validate="true" in struts-config.xml action tag then what is the sequence of execution?

  1. Validate () method of ActionForm, if error return to error.jsp
  2. Validate () method of ActionForm, execute () of Action, if error return to jsp mentioned in input tag.
  3. Validate () method of ActionForm, if error return to jsp mentioned in input tag.
  4. None of the above
Question 17 Multiple Choice (Single Answer)

Reset () method of ActionForm returns?

  1. ActionErrors
  2. ActionError
  3. void
  4. ActionMapping
Question 18 Multiple Choice (Single Answer)

Is ActionForm serializable ?

  1. true
  2. false
  3. both 1 and 2
  4. None of the above
Question 19 Multiple Choice (Single Answer)

Which is not subclass of DispatchAction class?

  1. MappingDispatchAction
  2. MethodDispatchAction
  3. EventDispatchAction
  4. LookUpDispatchAction
Question 20 Multiple Choice (Single Answer)

Can there be multiple inside ?

  1. may be
  2. can't be
  3. None of the above
  4. no