Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the difference between private & public & friendly classes?

1062


What is a nullable field?

1033


How the metacharacters are different from the ordinary characters?

1012


What are variable arguments or varargs?

998


How to sort elements in a parallel array in java?

884


Is linkedlist thread safe in java?

989


What is the purpose of the finalize() method?

1244


Write a program to check for a prime number in java?

1035


Do loops java?

1009


Can we initialize the final blank variable?

1086


What initialize variables?

1011


Why collection doesn’t extend cloneable and serializable interfaces?

1098


what is ststic with example

2040


Why are getters and setters used?

1058


Explain 5 features introduced in jdk 1.7?

1016