public JspEmail(String sFileID, String sLocale, Object oCaller)
    {
        if (sLocale != null)
        {
            sFileID = sLocale + "-" + sFileID;
        }

        sHtmlName_ = "/" + sFileID + "-html.jsp";
        sPlainName_ = "/" + sFileID + "-plain.jsp";

        request_ = new StringHttpServletRequest();
        response_ = new StringHttpServletResponse();
        request_.getSession().setAttribute(PARAM_CALLER, oCaller);

        // if using GameServer and jsp servlet engine not created, create it
        synchronized (JspEmail.class)
        {
            if (LOCALJSP && jsp_ == null)
            {
                jsp_ = new JspServlet();
                try
                {
                    File logDir = new File(new DefaultRuntimeDirectory().getServerHome(), "log");
                    File scratch = new File(logDir, "jsp-" + ConfigManager.getAppName());
                    ConfigUtils.verifyNewDirectory(scratch);
                    logger.info("JSP Email scratch in " + scratch.getAbsolutePath());
                    ServletConfig config = new EmbeddedServletConfig("email", scratch.getAbsolutePath());
                    config.getServletContext().setAttribute(InstanceManager.class.getName(), new SimpleInstanceManager());
                    jsp_.init(config);
                }
                catch (ServletException se)
                {
                    throw new ApplicationError(se);
                }
            }
        }
    }
@Test
    public void jspEmail() {
        new ConfigManager("testapp", ApplicationType.COMMAND_LINE);
        JspEmail jsp = new JspEmail("jsp_email", null, this);
        jsp.getSession().setAttribute("name", "JSPEmail Unit Test");
        jsp.executeJSP();
        String plain = jsp.getPlain();
        String html = jsp.getHtml();
        String subject = jsp.getSubject();
        assertEquals("HTML JSPEmail Unit Test", html);
        assertEquals("PLAIN JSPEmail Unit Test", plain);
        assertEquals("Subject Test", subject);
    }