This set of Java Spring Multiple Choice Questions & Answers (MCQs) focuses on “Managing Web Flows”.
1. Spring supports web flows by:-
a) Java
b) XML
c) All of the mentioned
d) None of the mentioned
View Answer
Explanation: Spring supports defining a flow either by java or XML.
2. Spring manages UI as flows.
a) True
b) False
View Answer
Explanation: Spring Web Flow allows you to model UI activities as flows.
3. Stated related to Spring Web flows.
a) view
b) action
c) decision
d) all of the mentioned
View Answer
Explanation: Spring Web Flow builds in several state types, including view state, action state, decision state, subflow state, and end state.
4. Once a state has completed its tasks, it fires an event.
a) True
b) False
View Answer
Explanation: An event contains a source and an event ID, and perhaps some attributes.
5. Required dependencies to manage web UI flows.
a) spring web flow distribution.
b) org.springframework.webflow
c) all of the mentioned
d) none of the mentioned
View Answer
Explanation: To manage your web UI flows with Spring Web Flow, you need the Spring Web Flow distribution (e.g.,v2.0.8) on your CLASSPATH.
6. Spring Web flow supports.
a) Unified EL
b) Object-Graph Navigation Language (OGNL)
c) All of the mentioned
d) None of the mentioned
View Answer
Explanation: Spring Web Flow supports using Unified EL (used in JSF 1.2 and JSP 2.1) and Object-Graph Navigation Language (OGNL), which is used in Tapestry, WebWork, and other frameworks, as its expression language.
7. Spring Web flow can enable both Unified EL and Object-Graph Navigation Language (OGNL).
a) True
b) False
View Answer
Explanation: Spring Web Flow is able to detect the libraries of JBoss EL (as the default Unified EL implementation) and OGNL from the classpath. You can enable either of them (but not both) by including the corresponding JAR file in your classpath.
8. To create URL path mappings from the ids of registered flow definitions.
a) FlowHandlerMapping
b) FlowHandler
c) FlowHandlerMappingRequest
d) None of the mentioned
View Answer
Explanation: The FlowHandlerMapping follows a convention to create URL path mappings from the ids of registered flow definitions.
9. XML Based flow definitions can be validated by:-
a) Spring Web Flow XSD
b) Spring IDE
c) SpringSource Tool Suite
d) All of the mentioned
View Answer
Explanation: Spring Web Flow offers an XML–based flow definition language that can be validated by Spring Web Flow XSD and supported by Spring IDE or SpringSource Tool Suite (STS).
10. Element to trigger an action for view module.
a) on-render
b) on-action
c) on-trigger
d) none of the mentioned
View Answer
Explanation: You can use the on-render element to trigger an action for a view state before its view renders.
11. Variable to trigger the flow execution.
a) ${flowExecutionUrl}
b) ${exec.flow}
c) ${flowExecutionUrl.match}
d) none of the mentioned
View Answer
Explanation: You have to start the URLs with the variable ${flowExecutionUrl} to trigger a flow execution. This variable will be evaluated by Spring Web Flow at runtime.
12.Servers which listen on port 8080.
a) Apache Tomcat 6.0
b) Jetty
c) None of the mentioned
d) All of the mentioned
View Answer
Explanation: By default, Tomcat and Jetty (and the Maven Jetty plugin configured for this code) listen on port 8080.
13. Interface which is used to persist instances sessions.
a) serializable
b) file.io
c) io.file.*
d) none of the mentioned
View Answer
Explanation: Implement the Serializable interface, as its instances may need to be persisted in sessions.
14. Class which assist Spring Web flow in handling form.
a) Form
b) FormAction
c) FormHandler
d) Form-Handler
View Answer
Explanation: Spring Web Flow provides a FormAction class to assist you in handling forms.
15. Property for action to instantiate form objects.
a) formObjectClass
b) formClass
c) objectClass
d) none of the mentioned
View Answer
Explanation: A form action can bind form fields to a form object’s properties of the same name. But you first have to specify the form object class in the formObjectClass property for this action to instantiate form objects.
Sanfoundry Global Education & Learning Series – Java Spring.
To practice all areas of Java Spring, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Get Free Certificate of Merit in Spring
- Participate in Spring Certification Contest
- Become a Top Ranker in Spring
- Take Spring Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Apply for Spring Internship
- Practice Programming MCQs
- Apply for Programming Internship
- Buy Spring Books
- Buy Information Technology Books