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

What is the difference between CGI and Servlet?

681


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

599


What is generic servlet class?

687


What are the steps that are involved in using the httpservlet class?

669


What is the type of method for sending request from http server?

681






What are the important functions of filters?

678


What exception should be thrown when servlet is not properly initialized?

647


Explain servlet.

667


How to get the path of servlet in the server?

612


How do I support both get and post from the same servlet?

793


How can we achieve transport layer security for our web application?

663


What do you mean by request dispatcher in servlet?

713


I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>

2616


What mechanisms are used by a Servlet Container to maintain session information?

761


How is a servlet implemented in code?

649