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
posted
0
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
posted
0
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
posted
0
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
posted
0
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
posted
0
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
posted
0
i think it's utility for any servlet and help about log or somethink like init() for any servlet Fix me...