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 business logic written using servlets not in jsp. Jsp
used for presentation purpose. serlvet used for coding
business logic and controller logic. Reason for using
servlets in business logic.

Answers were Sorted based on User's Feedback



why business logic written using servlets not in jsp. Jsp used for presentation purpose. serlvet u..

Answer / jitendra

Its for reusability purpose.jsp should be only used for
presentation purpose and our html designer,who later design
the page is not aware of java coding will not be comfortable.
and writing all buiseness logic in servlet lets the code
reusable.and for writing buiseness logic in jsp page there
are some other way like using scriplets.so why do the job
with less profit and extra work.

Is This Answer Correct ?    11 Yes 2 No

why business logic written using servlets not in jsp. Jsp used for presentation purpose. serlvet u..

Answer / rajesh

In servlets we have resource for developing the business
logic but Jsp have the tags for present the output clerly.

Is This Answer Correct ?    6 Yes 6 No

why business logic written using servlets not in jsp. Jsp used for presentation purpose. serlvet u..

Answer / nishant

Actually the main reason behind this when the servlet is
used for both presentation & business logic, the tight
coupling between presentation & business logic creates the
problem to the reusablity, because sometime change in
business logic tends to change in presentation logic. Apart
from that the tags & HTML like enviroment makes the webpage
more dynamic.

Now if we are using jsp page for business logic then
scriptlet will be more inside the JSP page which leads to
heavy maintaince cost. The business techies call it as
MODEL1 Architecture.

The seperate declaration of servlet for business unit will
avoid all above.Say MODEL2 Architecture.

Is This Answer Correct ?    3 Yes 3 No

why business logic written using servlets not in jsp. Jsp used for presentation purpose. serlvet u..

Answer / gopika

In layman's terms, JSP is core Java embedded in HTML. Servlet has HTML embedded in core Java. You must be aware that HTML is used to define the page structure of a web page at the client side and it deals with how to present the data in a web page. The purpose of JSP introduction is to add very few lines of core Java to help display the web page at the client side and hence, populating many lines of core Java is not appreciated in JSP.

Is This Answer Correct ?    0 Yes 0 No

why business logic written using servlets not in jsp. Jsp used for presentation purpose. serlvet u..

Answer / manikandan [ gtec,vellore ]

jsp files are converted to a servlet file it can b read any
one but servlet files are compile to .class file that so
servlet is used for business logic and jsp are not

Is This Answer Correct ?    5 Yes 7 No

Post New Answer

More Servlets Interview Questions

Difference between doget and dopost?

0 Answers  


Whats the advantages using servlets over using CGI?

0 Answers  


How to get ip address in jsp login page and how to validate like 127.1.0.1 all should not be greater than 255

0 Answers   Bosch, EF,


How we can get ip address of client in servlet?

0 Answers  


What are the kinds of http requests?

0 Answers  


Difference between web container & web server........... Difference between web server & application server?????????

8 Answers   TCS,


What do you mean by a filter and how does it work?

0 Answers  


waht is the main diference b/w servelts and JSP ?

8 Answers   CAP, HCL,


How can you run a servlet program?

0 Answers  


How do you create connections for number of users, if you want to improve performance?

2 Answers  


What are the uses of servlets?

0 Answers  


What are the key methods that are involved in processing of http servlets?

0 Answers  


Categories