Spring Questions and Answers – Managing Web Flows

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

Answer: c
Explanation: Spring supports defining a flow either by java or XML.

2. Spring manages UI as flows.
a) True
b) False
View Answer

Answer: a
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

Answer: d
Explanation: Spring Web Flow builds in several state types, including view state, action state, decision state, subflow state, and end state.
advertisement
advertisement

4. Once a state has completed its tasks, it fires an event.
a) True
b) False
View Answer

Answer: a
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

Answer: b
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.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

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

Answer: c
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

Answer: b
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.
advertisement

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

Answer: a
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

Answer: d
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).
advertisement

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

Answer: a
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

Answer: a
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

Answer: d
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

Answer: a
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

Answer: b
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

Answer: a
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.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.