What is struts?
1.A Technology
2.A Frameworks
3.A Java Development Tool Kit
4.A Language.
Answer: 2
Struts is not a new language .It is not a part of JDK of not a Java Development Tool Kit. Infect it is new technology which provide a frameworks to work on web based applications.
How can we retrieve keyed values from a previously defined resource bundle?
a. Using bean:message tag
b. Using bean:include tag
c. Using bean:header tag
d. Using bean:error tag
Answer: a
Which method is necessary for Action class?
a.valuator()
b.reset()
c.findForward()
d.delet()
e.execute()
Answer: e
The parameters passed into execute() method is?
A. ActionMapping mapping, ActionForm form, ServletRequest request, ServletResponse response.
B. Mapping mapping, ActionForm form, ServletRequest request, ServletResponse response.
C. ActionMapping mapping, Form form, ServletRequest request, ServletResponse response.
D. ActionMapping mapping, ActionForm form, ServletRequest request, Response response.
E. ActionMapping mapping, ActionForm form, Servlet request, ServletResponse response.
Answer: A
What is return type of execute() method in struts2?
A. void
B. String
C. int
D. ActionForward
E. ActionMapping
F. ActionForm
Answer: B
Where key will generated ?
A. In Action class
B. In ActionForm Class
D. In ActionMapping Class
E In ActionServlet Class
Answer: A
We can create how many struts config file in a struts application?
A. Only One
B. Only Two
B. Zero
C. As many we needed
D. All are wrong.
Answer: C
Struts application architectures based on the Model-View-Controller (MVC)-1 design pattern
1.Yes
2.No
Answer: 2
Struts application architectures based on the Model-View-Controller (MVC)-2 design pattern
1.Yes
2.No
Answer: Yes
The ActionServlet class and Action classes are used are controller into struts application
1.Yes
2.No
Answer: 1
Choose one of the following which must be have only single class for an application
1.Subclass of ActionServlet class
2. Subclass of Action classes
3. Subclass of ActionForm classes
4. None
Answer: 1
How many ActionServlet class for an application
1.1
1.2
3.3
4.4
5. As Many as we wise.
Answer: 1
How many Action class for an application
1.1
1.2
3.3
4.4
5. As Many as we wise
Answer: 5
How many Action class for a subclass of ActionForm
1.1
1.2
3.3
4.4
5. As Many as we wise
Answer: 1
How many web.xml you can use file for an application
1.1
1.2
3.3
4.4
5. As Many as we wise
Answer: 1
How many of “struts-config.xml file for an application
1.1
1.2
3.3
4.4
5. May be more than one
Answer: 5
How many of xml files must have use in validate framework
1.1
1.2
3.3
4.4
5. May be more than one
Answer: 2
Which are primary components of controller?
1.Action Class
2.A servlet of class ActionServlet
3.A class of ActionForm
4.A class of ActionMapping
Answer: 2
A servlet of class ActionServlet is configured by
1.Defining a set of Action Class
2.Defining a set of ActionMappings
3.Defining a set of ActionForm
4.None
Answer: 2
Choose true for ActionFrom
1 ActionForm beans are closer to View the than the Model.
2.ActionForm beans are closer to the Model than the View
3.Store additional information from pervious GUI.
4.All of the above
5. None
Answer: 1,3
Choose true for ActionForm bean have
1.Only property getter and property setter methods,
2.Business logic
3.Specific methods to be implemented.
4.All of the above
5. None
Answer 1
The ActionForm provides an validate() methods . Struts will automatically validate the input from the form and calls this method.
1.Yes
2.No
Answer: 1
Which of following arguments will be passed into validate() method?
1.ActionMapping mapping
2.HttpServletRequest request
3.HttpResponse response
4.ActionForm form
5.None
Answer: 1, 2
Choose true one
1.Model in Struts can interact with any standard data access technology, including EJB, JDBC, and ORB.
2.View in Struts works well with JSP, including JSTL and JSF, as well as Velocity Templates, XSLT, and other presentation systems.
3.1,2
4.None
Answer: 3