This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 3222
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:
subject: GenericServlet and HttpServlet
Similar Threads
Servlets not loading
How to differentiate ordinary java class file and servlet class file?
Mock exam question on encodeURL
Servlet program not running
How to set conf file file