aspose file tools*
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 Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "GenericServlet and HttpServlet" Watch "GenericServlet and HttpServlet" New topic
Author

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.
http://localhost:8080/servlet/servletfilename
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?
Thanks
Raj.

------------------

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

Joined: Jan 30, 2000
Posts: 3222
    
    5
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