Answer Posted / hari
The main disadvantage with Struts framework is it is
Tightly coupled.
for Example
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
Here if we use struts we need to call these 4 parameters
for every class i.e. AM AF,request and response.
Here it goes clear explanation
When comparing with business logic component development in
Struts. In Struts business logic component is derived from
Action class of Struts API.
The method implemented in Action class must be an execute
() method, its arguments are Struts API classes
ActionMapping, ActionForm, HttpServletRequest and
HttpServletResponse and the method return type ActionForward
But the method implementation may contain logic to insert
record into one table. For instance the business method is
saveEnquiry.
But the class, the method name, the method arguments and
the return type of the method are specific to Struts
framework.
If we want to use the saveEnquiry functionality outside the
Struts framework. We cannot execute Action class execute()
method outside the Struts framework.
The saveEnquiry() method functionality became specific to
Struts framework only. Such type of business logic classes,
methods and their implementations are heavy weight.
So this is the main disadvantage of Struts as per my
knowledge.
| Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
How interceptor works in struts 2?
What is the use of interceptor?
What are action errors and error and what are the consequences they impose?
Provide some important Struts2 constants that you have used?
What is the purpose of @requiredstringvalidator?
Why aren’t the struts tags maintained as part of the jakarta taglibs project ?
What is the purpose of @emailvalidator annotation?
How the exceptions are handled in struts?
What’s the difference between validation.xml and validator-rules.xml files in struts validation framework?
What is Struts2?
What are different Struts2 tags? How can we use them?
What is the purpose of @results?
How duplicate form submission can be controlled in struts?
Which model components are supported by Struts?
Difference between struts and spring? Or why use spring, if you are already using struts?