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
Is java a software?
Detail discussions on JVM, memory management and garbage collector.
What is autoboxing and unboxing?
Can you write a java class that could be used both as an applet as well as an application?
What is arraylist class in java?
Can interface be private in java?
How to run a JAR file through command prompt?
Java openings 3 - 5 years, Lnt Infotech. requirements - core java, J2ee, struts, hibernate Interview Date:- 19 March 2011 Time:- 9:00 AM to 12:00 Pm Interview Location - L & T Infotech, Manapakkam, Chennai Refererral PS NO:- 291649 (Please mention this when u fill the form only then u will be considered for interview) Documents Required:- Latest Resume, Photograph and last 3 payslips Mail me on vasan2211@gmail.com once u appear for interview
How can I debug the Java security exceptions and AccessControlExceptions?
Differences between C and Java?
Can abstract class have private constructor?
Can we override tostring method in java?
What is the replace tool?
Is java call by reference?
Explain restrictions for using anonymous inner classes?