• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

can we write a program by implementing servlet?

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I mean we can write servlet program by extending GenericServlet and HttpServlet ,is it possible by implementing Servlet ?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Raul, I'm not sure what you're asking.
Could you explain your question in a little more detail?
 
Saloon Keeper
Posts: 28807
212
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. In fact, the whole architecture is designed for general-purpose request/response serving. It's just that the most common implementation of that particular paradigm is HTTP.

What you get from HttpServlet is additional functions that understand the specific needs of an HTTP server. If my memory is any good, among other things, that means that the raw Servlet's service() method is overridden and replaced with on that calls doGet() or doPost() depending on whether the incoming HTTP request is a GET or a POST.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think you can do it by implementing all of Servlet's methods

such as service(),getServletInfo(),getServletConfig(),init(config)
destroy()
 
Water proof donuts! Eat them while reading this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic