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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different methods of session management in servlets?

768


Can you use javascript in servlets?

594


What is MIME Type?

655


Which java framework is most popular?

568


Explain the lifecycle of a servlet?

496






What is the difference between encodeRedirectUrl and encodeURL?

594


Explain the difference between servlet and cgi?

594


How do you invoke a servelt?

610


Explain the difference between a web server and a web container?

502


How can you use a servlet to generate a plain text instead of html?

574


What is the capacity the doget can send to the server?

565


What is the default http method in the servlet?

748


Which interface should be implemented by all servlets?

686


What do you mean by filter in servlet?

528


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

614