why we use struts in our web application , means what was
drawbacks of servlet ...pls answer

Answer Posted / maneesha pandey

Programming web applications using servlets only is a very
hard thing, since you will have to write your HTML code
inside the servlet, which will produce complex, unreadable
and unmaintainable code.

The same thing is with JSP. If you program a web application
using JSP alone, you'll have to put your java code in JSP
pages, which will also be very hard to read and maintain.

This was the reason of the rise of the model 2
architecture(srtuts), where the servlet controls the flow of
the request, calls a model class to do the business logic,
decides which view (jsp or other) to send to the user, and
then sends the response to the user. This is known as the
MVC (Model-View-Controller) design pattern.

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whats the difference between the default namespace and the root namespace?

521


How you will enable front-end validation based on the xml in validation.xml?

576


How to override the default error message that can come during file uploading process?

578


What are the conditions for actionform to work correctly?

528


How do you find the struts version being used in a project?

520






Is struts mvc framework?

484


What are the steps required for setting up validator framework in struts?

567


What is struts and why it is used?

505


How does struts work?

550


What does validation interceptor?

549


What is the default suffix for Struts2 action URI and how can we change it?

526


What are best practices to follow while developing Struts2 application?

611


What is the apache struts vulnerability?

525


What applications use apache struts?

499


What steps are required to for an application migration from Struts1 to Struts2?

612