File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes usage of generic servlet -- still not clear Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "usage of generic servlet -- still not clear" Watch "usage of generic servlet -- still not clear" New topic
Author

usage of generic servlet -- still not clear

deepa karkala
Ranch Hand

Joined: Jan 29, 2003
Posts: 62
Hi everyone, I went through the existing archives to understand where do we use generic servlet ? I did not find clear answer.
I know that it is a base class for httpservelt.
In one of the postings, i read that it is used to create protocol independent servlet. What does it mean?
I would highly appreciate if anyone can answer my question with clear answer.
thanks.
jamel bal
Greenhorn

Joined: Jun 01, 2003
Posts: 23
Hello
I advise you to read some about J2EE. And you will understant where the GenericServlet will be used other then a parent class for HttpServlet.
deepa karkala
Ranch Hand

Joined: Jan 29, 2003
Posts: 62
I have been working in J2EE projects. But i never came across writing generic servlets. That's why i am asking this question.
bobby chaurasia
Ranch Hand

Joined: Mar 30, 2002
Posts: 84
jyoti,
When the container receives a request it directs the request to the sevice( servletrequest, servletresponse) method which inturn calls its service( HttpServletRequest, HttpServletResonse) method. This method analyzes the request and passes it to apporiate doGet/doPost etc method.
I hope the utility of the generic service method is clear now.
Cheers!
deepa karkala
Ranch Hand

Joined: Jan 29, 2003
Posts: 62
Hi Bobby, thanks for your cheerful reply. But what i am saying is, I have been using httpservlets to handle http requests. Ofcourse, it has all these doGet(), doPost() methods. I know that it is not advised to override the service method in case of httpservlet.
Do u mean this itself is the usage of generic servlet ? Does it mean that the generic servlet handles the http requests ?
I would highly appreciate if u can clear my confusion.
deepa karkala
Ranch Hand

Joined: Jan 29, 2003
Posts: 62
Hi Bobby, someone asked me whether generic servlets handle http requests ? Where do we use generic servlets ?
I am in the impression that generic servlets can not handle http requests. We have to use http servlets to handle http requests.
Secondly, where do we use generic servlets ? Do we use it for ftp service or something similar ?
I am curious to find out the answers for this.
Weerawit Maneepongsawat
Ranch Hand

Joined: Apr 11, 2002
Posts: 203
i think it's utility for any servlet and help about log or somethink like init() for any servlet
Fix me...


Weerawit<br />SCJP 1.4, SCWCD 1.2, SCWCD 1.4, SCBCD 1.3, SCBCD 5.0, SCMAD 1.0, SCJA 1.0, SCDJWS, SCJD, SCEA, SCDJWS 1.5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: usage of generic servlet -- still not clear
 
Similar Threads
Socket Server calling web service
diff b/w generic servlet and http servlet
store a file in tomcat server
GenericServlet with constructor
Generic return types