wood burning stoves
The moose likes Servlets and the fly likes GenericServlet and HttpServlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "GenericServlet and HttpServlet" Watch "GenericServlet and HttpServlet" New topic

GenericServlet and HttpServlet

Rajpal Kandhari
Ranch Hand

Joined: Aug 26, 2000
Posts: 126
Hello Everyone,
Could anyone explain me the following:

1. diffrance between GenericServlet and HttpServlet?

2.To invoke a servlet (assuming that server is on local machine) we use the following URl.
I am told that 8080 is the communication port. Is this right? Or there is more in this?
What dose "servlet" mean in the above URL?


Regards,<P>Raj.<BR>-------------------------<BR>Afforts should be Appriciated.<BR>-------------------------
Tony Alicea

Joined: Jan 30, 2000
Posts: 3226
The difference between GenericServlet and HttpServlet is that the first one is an abstract class and the second one is an implementation of the first one. The abstract GenericServlet also implements the interfaces Servlet, ServletConfig and Serializable
8080 is not a sacred number. You can configure it to be anything.
/servlet lets the server know that it's a servlet that has been requested. It is not absolutely needed. You could as easily have http://localhost:8080/servletfilename
It's all configurable depending on your server.

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
I agree. Here's the link: http://aspose.com/file-tools
subject: GenericServlet and HttpServlet
It's not a secret anymore!