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
Does java have a compiler?
Who is the owner of java?
What do you understand by the bean persistent property?
What is the use of default method in interface in java? Explain
What is a superclass?
How we create object in copy constructor?
What is tree node in java?
Can a class be defined inside an interface?
What are the 3 types of control structures?
Discuss different types of errors that generally occur while programming.
How many types of string data types are there?
Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me
Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
which class is the wait() method defined in? : Java thread