What are the parameters of the service method ?

Answer Posted / shakir khan

service() method called servlet to handle client request in
a new thread.service() method accepts ServletRequest and
ServletResponse objects as parameters.ServletRequest object
contains client requests.It contains data sent in
name/value pairs.

ServletResponse object is used to send the respose to the
client.

public void service(ServletRequest req,ServletResponse res)
throws ServletException,IOException
{
}

Is This Answer Correct ?    10 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How the typical servlet code look like ?

617


What is servlet api used for conneting database?

676


Define the servlet mapping.

528


What is the difference between the include() and forward() methods?

546


Explain jsessionid?

598






Explain the difference between generic servlet and http servlet?

524


What are the types of protocols supported by httpservlet ?

679


Why is httpservlet declared abstract?

561


Differentiate between the get and post method

544


What is the directory structure of a war file?

687


What is the importance of init() method in Servlet ?

573


What are important features of Servlet 3?

576


How do you load an image in a Servlet?

632


What are the two important api's in for servlets?

563


What is a servlet context?

582