package oracle.portal.sample.v1.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("helpMode");
        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>");
    }
}
