Why can't we make jsp as a controller and action
servlet in struts?
Answer Posted / sivadasan
Most of the applications are created in MVC design pattern
to seperate the functions of differnet components and
handle the complexity of applications.
JSP and Servlets are the server side components which can
respond to the client request.
Servlets are the basic components for request handling in
Web Server. They contains pure Java code.
Everything that needs to be done to generate the proper
user response (which is genarally HTML code) needs to be
done through coding. As a single servlet cannot respond
each and every request by itself as client request varies
in type (e.g. enquiry update request add etc) the request
and response object is passed onto different servlets with
little task completed by each servlet.
This controlling part is easier to write in java. So
Servlet is used as controller.
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Is null a keyword in java?
What are the different types of inner classes?
Can you give few examples of final classes defined in java api?
What is java beans?
What is thread safe java?
how to create constants in java?
Why main() method is public, static and void in java ?
What are untrusted applets?
Can a lock be acquired on a class in java programming?
Difference between character constant and string constant in java ?
Why does java not allow multiple public classes in a java file ?
Explain method overloading?
Can a static class implement an interface?
Can we have more than one package statement in the source file?
What are the types of web technologies?