View RSS Feed


A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request-response programming model.

  1. Implementing service method or doGet/doPost

    by , 11-08-2011 at 06:37 PM (My Java Tips)
    "Whether to implement 'service' method or 'doGet/doPost' in Http Servlet ?" ,Is question often heard at least in the beginners columns.

    Actually the answer depends on the requirement.

    First we should know that the purpose of servlet is to accept an HTTP request from a Web browser, and return an HTTP response. This is done by "service", "doGet\ doPost" methods. Each of these include request object (HttpServletRequest) to receive data from ...
  2. Fetching parameters from web.xml

    by , 05-24-2011 at 02:30 PM (My Java Tips)
    The file named web.xml is part of your web applications. You may use it for different purpose. Sometimes you wish to define some parameters for your web application in it. Obviously, you need to use this in your application. I will briefly tell you how to do this.

    At first, let me give you an example. We have a web application that needs to send its id and license code to some authentication server before doing some business operation. The id and license code are static and you may ...

    Updated 05-24-2011 at 02:34 PM by Java Tip

    JSP , Servlet , XML