package oracle.portal.sample.v2.devguide.submitServlet;

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

public class HelpServlet extends HttpServlet
{
    public void doPost(HttpServletRequest req, HttpServletResponse res)
        throws ServletException, IOException
    {
        doGet(req, res);
    }

    public void doGet(HttpServletRequest req, HttpServletResponse res)
        throws ServletException, IOException
    {
        PrintWriter out = res.getWriter();
        String mode = req.getParameter(ShowServlet.HELP_MODE);
        if (mode != null && mode.equals("1"))
            out.println("<I>This is context sensitive help page 1</I>");
        else if (mode != null && mode.equals("2"))
            out.println("<I>This is context sensitive help page 2</I>");
        else
            out.println("<I>This is the main help page</I>");
    }
}
