Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please give clear explanation

 
anilkumar choudary
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can we call the generic servlet from a http request,
can we use the service inside the http servlet are there any restrictions to use service method in http servlet
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64700
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose better subject lines for your posts. Read this for more information.
 
ak pillai
author
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are no restrictions. But service(...) method of the GenericServlet provides a fair bit of housekeeping that you'd just have to do yourself. If you have some share functionality, you can use composition to achieve reuse by creating a helper class & methods and call that at the beginning of e.g., doPost() and doGet(). If you prefer using inheritance to achieve code reuse then you can do something like following in your extending class:



[ July 14, 2006: Message edited by: ak pillai ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic