aspose file tools*
The moose likes Servlets and the fly likes about http actions in while using generic servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "about http actions in while using generic servlet" Watch "about http actions in while using generic servlet" New topic
Author

about http actions in while using generic servlet

vinaykrothapalli kumar
Greenhorn

Joined: Aug 29, 2005
Posts: 12
Dear friends i have a small question
how can we do the http operatins when we extends generic servlet in to our servlet
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

What do you mean?
Anoop Kavalloor
Greenhorn

Joined: Sep 06, 2004
Posts: 15
Hi mate,
The Servlet API has given two classes namely javax.servlet.GenericServlet and javax.servlet.http.HttpServlet. You are supposed to extend to HttpServlet if you want the underlying protocol to be HTTP. If u extend to GenericServlet, then you have to write the tedious work of managing the network protocol.



I am not completely useless.<br />I can be used as a bad example.<br /> <br />SCJP 1.4
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"Unqualified Genius",
You have already rrecieved a warning about your display name here.

Please correct it immediately or your account will be deleted.

thanks,
David O'Meara
Moderator.
Rajesh Agarwal
Ranch Hand

Joined: Aug 01, 2005
Posts: 79
HttpServlet is a subclass of GenericServlet. I dont think so it is possible to use http methods without implementing it yourselves in your GenericServlet.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: about http actions in while using generic servlet