package examples.servlets;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

import weblogic.html.*;

/**
 * HelloKonaServlet. The minimal htmlKona-enabled servlet.
 *
 * @author Copyright (c) 1996-98 by WebLogic, Inc. All Rights Reserved.
 * @author Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
 */
public class HelloKonaServlet extends HttpServlet {

  /**
   * A very simple implementation of the service method, in
   * which we construct an htmlKona servlet page and print
   * "Hello world!" on it.
   */
  public void service(HttpServletRequest req, HttpServletResponse res)
       throws IOException
  {
    res.setContentType("text/html");
    ServletPage page = new ServletPage("Hello World!");
    page.getBody().addElement("Hello world from htmlKona!");
    page.output(res.getOutputStream()); 
  }
}
