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 How many different ways to create Servlets ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How many different ways to create Servlets ?" Watch "How many different ways to create Servlets ?" New topic
Author

How many different ways to create Servlets ?

Sudha
Greenhorn

Joined: Feb 25, 2007
Posts: 2
Hi all,

We can create servlets by ;

a) Servlets by extending two classes and over write methods
b) retrive the existing Servlets from the pool

Is there any other way to create Servlets ?

Thanks,
Suda
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

"Sudha",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39529
    
  27
I'm not sure that I understand your question. You create a servlet by declaring it in the web.xml file. The class needs to implement the Servlet interface.

As to a), in Java a class can not extend two classes - only a single one. Or did you mean youj can either extend GenericServlet or HttpServlet?

As to b), what pool are you talking about?
[ February 25, 2007: Message edited by: Ulf Dittmer ]

Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How many different ways to create Servlets ?
 
Similar Threads
Deploying a servlet
J2EE Environment Variables
Is it allowed to create threads inside servlets?
Passing the session variable from one HTML to JSP through Servlets?
Un-downloadable Applets