aspose file tools*
The moose likes Servlets and the fly likes please give clear explanation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "please give clear explanation" Watch "please give clear explanation" New topic
Author

please give clear explanation

anilkumar choudary
Greenhorn

Joined: Jun 15, 2006
Posts: 6
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

Joined: Jan 10, 2002
Posts: 61436
    
  67

Please take the time to choose better subject lines for your posts. Read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ak pillai
author
Ranch Hand

Joined: Feb 11, 2006
Posts: 288
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 ]

java j2ee job interview questions with answers | Learn the core concepts and the key areas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: please give clear explanation