Olete.in
Articles
Mock Tests
🧪 Struts MCQ Quiz Hub
Struts Mcq Question Set 1
Choose a topic to test your knowledge and improve your Struts skills
1. Abbreviate the term POJO?
Plain Old Java Object
Performance Old Java Object
Performance Optimize Java Object
none of the above
2. Struts supports which of these model components?
JavaBeans
EJB
CORBA
All Mentioned above
3. Spring framework provides an difficult way to manage the dependency, It cannot be easily integrated with struts 2 framework.
True
False
all of the above
None of the mentioned
4. Which validates the given string with the specified regular expression,it can be used in password, security key etc.?
Regex Validation
Url Validation
Email Validation
RequiredString Validator
5. Which type of validation we must implement the Validateable interface (or extend ActionSupport class) and provide the implementation of validate method?
By Input Validation
By Ajax Validation
By Custom Validation
none of the above
6. Abbreviate the term OGNL?
Object-Goal Navigation Language
Object- Graph Navigation Language
Oriented-Graph Navigation Language
none of the above
7. Which is used to make asynchronous request i.e. it doesn't block the user and it sends only required field data to the server side not all, So it makes the performance fast?
AJAX Support
Integration Support
Various Tag Support
Theme and Template Support
8. We need to write the controller code self, If we change the controller code, we need to recompile the class and redeploy the application this is a disadvantage of which MVC Architecture?
MVC 1 Architecture
MVC 2 Architecture
All of the above
none of the above
9. Struts combines which of these in to a unified Framework?
Java Servlets
Java Server pages
Custom tags and Message Resources
All mentioned above
10. Interceptor can change the flow of the application by returning the string.
True
False
all of the above
None of the mentioned
11. Which configuration files are used in Struts?
ApplcationResources.properties
struts-config.xml
All the above
none of the above
12. The workflow interceptor is used to get information about the error messages defined in the action class.
True
False
all of the above
None of the mentioned
13. What is used to display the intermediate result in an interceptor?
Params Interceptor
Custom Interceptor
ExecAndWait Interceptor
Prepare Interceptor
14. Which pattern is the struts framework based?
MVC2 Pattern
Bridge Pattern
MVC 1 Pattern
none of the above
15. Which interface must be implemented by the Action class to store the information in the session scope?
SessionAware Interface
ServletContextAware Interface
Both A & B
none of the above
16. Which servlet does the struts framework use?
EntryServlet
StrutsServlet
ActionServlet
BasicServlet
17. Which way will the architecture and flow of struts 2 application will go to understand the struts flow?
Basic
Standard
Both A & B
none of the above
18. The values configured in struts.properties file will override the default values configured in default.properties which is contained in the struts2-core-x.y.z.jar distribution.
True
False
all of the above
None of the mentioned
19. A valueStack is a simply stack that contains application specific object is _____ .
Action objects
Model object
Both A & B
None of the above
20. In which configuration file is there a link between the View and Model components in the Web Client but you would not have to touch these settings for 99.99% of your projects?
The struts-config.xml file
The struts.xml file
The web.xml file
The struts.properties file
21. POJO means you are not forced to implement any interface or extend any class.
True
False
all of the above
None of the mentioned
22. How many core components does the Model-View-Controller pattern in Struts2 have?
4
5
6
3
23. The struts 2 framework is used to develop MVC-based web application
True
False
all of the above
None of the mentioned
24. The i18n interceptor provides multi-lingual support for your application
True
False
all of the above
None of the mentioned
25. What is responsible in MVC for managing the data of the application which responds to the request from the view as well as to the instructions from the controller to update itself?
View
Model
Controller
none of the above
26. In which technology Struts 2 provides various types of tags such as UI tags, Data tags, control tags etc. to ease the development of struts 2 application?
Various Result support
Integration Support
Various Tag support
Theme and Template Support
27. Which of the following is correct about FreeMaker result type?
It is used to forward to a servlet, JSP, HTML page, and so on, on the server. It uses the RequestDispatcher.forward() method
It is used to generate output using predefined templates
It calls the standard response.sendRedirect() method, causing the browser to create a new request to the given location
None of the above
28. Which technology can be used at View Layer in Struts?
J2EE
DHTML
XML/XSLT
JavaScript
29. In which configuration file is a link between the View and Model components in the Web Client but you would not have to touch these settings for 99.99% of your projects?
The struts-config.xml file
The struts.xml file
The web.xml file
The struts.properties file
30. ActionServlet, RequestProcessor and Action classes are the components of
View
Model
Controller
Deployment
31. How to override default configuration of struts 2
Use struts.properties
Use custom file name and register it
Both a and b
None of the mentioned
32. Which of the following delegates the request handling to the RequestProcessor instance?
ActionServlet
Action class
Deployment descriptor
none of the above
33. What is the role of ActionContextCleanUp class in struts 2?
Handles special clean up task when filters need access to an initialized struts framework
Works like garbage collector in java
All of these
none of the mentioned
34. Which of the following methods is overridden by Action class?
run()
destroy()
execute()
service()
35. 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
36. Which of the following tag is used to render a I18n text message?
set tag
text tag
url tag
push tag
37. The Struts Framework is a standard for developing well-architected Web applications, it has the following features?
Open Source
Model View Controller
Implement the JSP Model 2 Architecture
All Mentioned above
38. Which method is necessary for Action class?
valuator()
reset()
findForward()
execute()
39. In interceptor which is used to display the intermediate result?
Params Interceptor
Custom Interceptor
ExecAndWait Interceptor
Prepare Interceptor
40. Which of the following tags in struts-config.xml file defines the availability of necessary Struts JSP custom tag libraries?
jsp-lib
struts-taglib
taglib
jsp-taglib
41. What is defeult result type?
dispatcher
FreeMaker
redirect
None of the above
42. In Struts, how can we access Java beans and their properties?
Row Library
Tag Library
Column Library
Table Library
43. In the Action interface which constant indicates that action execution is successful but no result should be shown to the user?
Success
Login
Input
None of the mentioned
44. Struts framework is based on
Servlet.JSP and Java
Servlet,.HTML and Java
Servlet JSP, XML and Java
Applet, XML and Java
Submit