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

Can inner class extend any class?

1097


What is method and methodology?

1158


What's the purpose of using break in each case of switch statement?

1041


What are the legal parameters?

1060


What is the difference between variable declaration and variable initialization?

1094


What is parseint?

1073


What is a return in java?

1075


What are untrusted applets?

1199


What is an object’s lock and which object’s have locks?

1011


String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?

1028


How we can generate random numbers in java?

1171


Explain about public and private access specifiers?

1119


What is the primitive type short?

1078


What is binary tree in java?

1119


Why do we need array in java?

1055