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
What are measurable parameters?
Can extern variables be initialized?
Can we assign the reference to this variable?
What is the difference between method overriding and overloading?
How to sort list of list in java?
What is method overloading with type promotion?
What is files manifesting?
What does system.gc() and runtime.gc() methods do?
Explain what do you mean by functional overloading in java?
what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread
Does constructor return any value?
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?
Why does my function print none?
What is a line break?
How java is similar to c?