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 qms manual?
Which is fastest collection in java?
Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain
What is tochararray in java?
Explain about procedural programming language or structured programming language and its features?
What are the types of java?
How many types of parsers are there?
What is instance example?
How objects are stored in java?
What is the difference between length and size in java?
What is string data?
What are the types of inner classes (non-static nested class) used in java?
what is the use of bean managed and container managed with example?
What is the collection interface?
What is the file type?