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
small footprint development server
I have a small footprint server running, it says:
Code:
JSDK WebServer Version 2.1
Loaded configuration from file:C:\jsdk2.1/default.cfg
endpoint created: :8080
I got it somewhere on the Sun server digging around in Servlets looking for a small footprint development server. I forgot where I put it, it is so unobtrusive.
RE:
Quote:
Originally Posted by
chilljava
(...snip...)yes there are many other softwares where you can run servlet, there are few light weight containers which will just run your servlet. try jetty server, or winstone server.