Why can't we make jsp as a controller and action
servlet in struts?
Answer Posted / aditya sinha
JSP is a part of presentation layer(View in MVC pattern)
which should be decoupled from controller or model, because
of its benifits of flexibility and modularity and focussed
responsibility.
By having the controller separate, we allow to choose the
presentations dynamically. But having them integrated
implies, change in presentation logic may also fiddle with
the controller segment embedded. Any new presentation would
attract unnecessary controller code repetition into it.
More over, if its(the controller segment) only an include
in JSP, then the overhead of JSP parsing to servlet is not
worth doing it.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is a byte string?
What is appletviewer?
Is arraylist zero based?
What are different type of exceptions in java?
What is an infinite loop in java? Explain with an example.
Difference between keyword and identifier.
Where are global variables stored?
does java support pointers?
What is charat java?
Can one thread block the other thread?
what is thread in Java ?
Explain the difference between throw and throws in java?
What are generic methods?
What's the default access specifier for variables and methods of a class?
What is the equal sign?