Hi Frieds, I am new to servlet why to use servlet in
webapplication. what i know is " use servlet as a
controller in mvc and to implemnent business logic . is it
correct ? One more thing reason for implementing business
logic with servlets , why not jsp.

Answer Posted / syed

Servlet is a server side technology,for developing
serverside application(web applications).

In ModelI we use Servlet and Jsp's only.jsp used for
Presentation logic and Servlet used for Business logic & as
Controller.

Why because- 1.for communating with DataBase
2.for container(server)recognise java code.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define the life cycle of a servlets.

798


Write a hello world program using servlets.

802


Whether thread can be used in servlets?

951


How to read request headers from servlets?

804


How to handle exceptions thrown by application with another servlet?

819


In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify

782


What is a servlet?

842


What is cookies in servlet with example?

727


Is tomcat a servlet container?

786


What is the directory structure of web application?

727


What are the types of an http request?

819


What are the jobs performed by servlets?

779


What is difference between the HTTP Servlet and Generic Servlet? Explain about their methods and parameters?

830


Explain the difference between generic servlet and http servlet?

741


What is the use of httpservletrequestwrapper and httpservletresponsewrapper?

772