import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** Servlet template. *

* Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems Press, * http://www.corewebprogramming.com/. * May be freely used or adapted. */ public class ServletTest extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Use "request" to read incoming HTTP headers // (e.g., cookies) and query data from HTML forms. // Use "response" to specify the HTTP response status // code and headers (e.g. the content type, cookies). PrintWriter out = response.getWriter(); out.println("Hello ! this my first servlet"); // Use "out" to send content to browser } }