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

What are the new features added to servlet 2.5?

604


What is new in ServletRequest interface ? (Servlet 2.4)

583


How to read request headers from servlets?

570


Which interface should be implemented by all servlets?

707


Why are http servlets used in programming?

556






List out the difference between ServletConfig and ServletContext?

615


What’s the difference between forward() and sendredirect() methods?

580


What is cookies in servlet with example?

526


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

606


What is the difference between portlet and servlet?

521


What is servlet in web technology?

582


Tell the new features added in servletrequest interface i.e. Servlet 2.4

582


Can you create a deadlock condition on a servlet?

599


When jsessionid is created?

611


If servlet receives multiple requests, how many objects will it create?

838