Results 1 to 4 of 4

Thread: Declaring interface in a Servlet

  1. #1
    Join Date
    Jan 2011
    Posts
    45

    Declaring interface in a Servlet

    Hello my friends , I am learning the Java programming language , I use the tool that use to develop the application . I had some sort of doubt regarding the servlets are concerned , I know that he interface can be used to implement multiple inheritance , but I was asking whether these servlets can implement the interface or not , please give me some idea on it. I will be very grateful.

  2. #2
    Join Date
    May 2009
    Posts
    527

    Re: Declaring interface in a Servlet

    You can make use of the public interface Servlet .This interface is usually used for developing servlets. A servlet is a body of Java programming that is taken into and runs within a servlet engine, such as a web server. It obtains and responds to requests from clients. For instance, a client might require information from a database; a servlet can be written that obtain the request, obtains and processes the data as required by the client, and then gives it to the client.

  3. #3
    Join Date
    May 2009
    Posts
    511

    Re: Declaring interface in a Servlet

    I too agree with this all servlets make use this interface. Servlet writers usually do this by subclassing either GenericServlet, that uses the Servlet interface, or by deriving GenericServlet's descendent, HttpServlet. Protgrammers require to openly implement this interface only if their servlets cannot (or select not to) derive from GenericServlet or HttpServlet. For instance, RMI or CORBA objects that serve as servlets will openly use this interface.

  4. #4
    Join Date
    May 2009
    Posts
    539

    Re: Declaring interface in a Servlet

    The Servlet interface describes functions to begin a servlet, to obtain and reply to client requests, and to destroy a servlet and its reserves. These are recognized as life-cycle functions, and are invoked by the network service in the following mode:
    • Servlet is formed then started.
    • Zero or more service invokes from clients are handled
    • Servlet is destroyed then the function of garbage collection takes place.

Similar Threads

  1. Replies: 7
    Last Post: 22-10-2011, 10:35 PM
  2. Spam from ibibo declaring me winner of 2 cars
    By Indrayan in forum Off Topic Chat
    Replies: 3
    Last Post: 03-09-2011, 07:45 AM
  3. Declaring and calling extension method in C #
    By Acalapati in forum Software Development
    Replies: 4
    Last Post: 25-02-2010, 06:46 AM
  4. Memory Allocation Techniques for declaring objects
    By Gill_christ in forum Software Development
    Replies: 2
    Last Post: 04-05-2009, 07:21 PM
  5. Replies: 3
    Last Post: 25-02-2009, 10:34 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,855,755.56093 seconds with 16 queries