Apache Struts Framework Quiz
Test your knowledge of Apache Struts framework, covering ActionForm, RequestProcessor, Tiles, and Struts configuration concepts
Questions
Can there be multiple tag inside tag in tiles-defs.xml?
- yes
- no
- None of the above
- It Depends.
If you have created a custom ActionMapping subclass with the property "service", you can initialize the value to "selectRecord" using
- <init-property name="service" value="selectRecord"/>
- <set-property property="service" value="selectRecord"/>
- <put-field key="service" content="selectRecord"/>
- None of Above
In Struts 1.1, you can change how Struts populates a form by
- Overriding the populate method of the ActionForm
- Overriding the processPopulate method of the Request Processor
- Overriding the populateBean method of the ActionMapping
- All of Above
We can create how many struts config file in an struts application?
- Only One
- Only Two
- Zero
- As many we needed
Which one is correct?
- <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>
- .<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
- <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>
- None
Org.apache.struts.action.Action class extends?
- Object class
- Action Servlet
- Http Servlet
- None Of the above
ReuestProcessor is based on following design pattern?
- Command Design Pattern
- Template Method Design Pattern
- Prototype Design Pattern
- Singleton Design Pattern
What is struts?
- A Technology
- A Frameworks
- A Java Development Tool Kit
- A Language.
Each Struts Action element is uniquely identified by its
- Input attribute
- Name attribute
- Page attribute
- Path attribute
From a MVC perspective, Struts provides the
- Model
- View
- Controller
- None of Above
The name of the Application Resources file is set by the servlet init-param named
- application
- resources
- ApplicationResources
- Messages
The bean:write tag is:
- Always converts HTML markup to entity equivalents, like <
- Never converts HTML markup to entity equivalents
- Converts markup when filter=true
- Converts markup when markup=false
To localize Tiles, you can
- Create separate configuration files for each locale
- Specify an locale for a definition
- Either A or B
- None of Above
What is return type of execute () method?
- void
- String
- ActionForward
- ActionMapping
How to use ReuestDispatcher to redirect URL ?
- <forward name="Success" path="/action/xys" />
- <forward name="Success" path="/action/xys" redirect=?true? />
- <forward name="Success" path="/action/xys" redirect="yes" />
- None of the above
If validate="true" in struts-config.xml action tag then what is the sequence of execution?
- Validate () method of ActionForm, if error return to error.jsp
- Validate () method of ActionForm, execute () of Action, if error return to jsp mentioned in input tag.
- Validate () method of ActionForm, if error return to jsp mentioned in input tag.
- None of the above
Reset () method of ActionForm returns?
- ActionErrors
- ActionError
- void
- ActionMapping
Is ActionForm serializable ?
- true
- false
- both 1 and 2
- None of the above
Which is not subclass of DispatchAction class?
- MappingDispatchAction
- MethodDispatchAction
- EventDispatchAction
- LookUpDispatchAction
Can there be multiple inside ?
- may be
- can't be
- None of the above
- no