View Single Post
  #1 (permalink)  
Old 04-18-2008, 10:08 PM
pooja.gupta84 pooja.gupta84 is offline
Member
 
Join Date: Apr 2008
Posts: 1
pooja.gupta84 is on a distinguished road
Doubt in basics of Servlets
Hello all,

I am new to servlets but have good knowledge of the basics of Java.
I have a couple of questions..

1. the service() method of the GenericServlet class accepts 2 parameters...one is of the ServletRequest and the other is of the type ServletResponse. My question is that ServletRequest and ServletResponse are interfaces in the javax.servlet package. How can you create an object of its type? Interfaces cant have objects...only classes can..right?

2. can a method return an object of type interface?
A method of the Servlet interface - getServletConfig returns an object of type interface :
ServletConfig getServletConfig()
How is this possible?

3. which other web servers apart from the apache tomcat does servlet support? Can servlets be run on iis, pws or any other server?


Thanks in advance to anyone who answers

Regards
Pooja Gupta
Reply With Quote
Sponsored Links