Examples of JspService


Examples of org.apache.turbine.services.jsp.JspService

        {
            templateName = '/' + templateName;
        }

        // let service know whether we are using a layout
        JspService jsp = (JspService)
            TurbineServices.getInstance().getService(JspService.SERVICE_NAME);
        jsp.handleRequest(data, "/screens" + templateName,
                          getLayout(data) == null);

        return null;
    }
View Full Code Here

Examples of org.apache.turbine.services.jsp.JspService

       
        String module = null;
        String template = null;
        Boolean flag = (Boolean)pageContext
                .getAttribute(FLAG, PageContext.REQUEST_SCOPE);
        JspService jsp = (JspService) TurbineServices.getInstance()
            .getService(JspService.SERVICE_NAME);
        try
       
            pageContext.getOut().flush();
            template = data.getTemplateInfo().getScreenTemplate();
           
            if ( staticContent || (flag != null && flag.booleanValue()) )
            {
                jsp.handleRequest(data, "/screens/" + template, false);
            }
            else
            {
                module = ((TemplateService)TurbineServices.getInstance().getService(
                TemplateService.SERVICE_NAME)).getScreenName(template);
View Full Code Here

Examples of org.apache.turbine.services.jsp.JspService

    public String getContent(RunData data, String name, String value, Map parms)
    {
        String result = null;

        // Get reference to jsp service
        JspService jspService = (JspService) TurbineServices.getInstance().getService(JspService.SERVICE_NAME);

        // Put basics in the context
        data.getRequest().setAttribute("data", data);
        data.getRequest().setAttribute("name", name);
        data.getRequest().setAttribute("value", value);
        data.getRequest().setAttribute("parms", parms);
        data.getRequest().setAttribute("events", this.getJavascriptEvents());

        try
        {
            // Add custom objects to the context
            this.buildContext(data, name, value, parms);

            // Build default template name (classname + .vm)
            String className = this.getClass().getName();
            int pos = className.lastIndexOf(".");
            pos = pos < 0 ? 0 : pos + 1;
            className = className.substring(pos);

            // Render the template
            String template = (String) this.getParm("template", className + ".jsp");
            String templatePath = TemplateLocator.locateParameterTemplate(data, template);
            jspService.handleRequest(data, templatePath);
            result = "";
        }
        catch (Exception e)
        {
            logger.error("Exception", e);
View Full Code Here

Examples of org.apache.turbine.services.jsp.JspService

        // get the name of the JSP we want to use
        String templateName = data.getTemplateInfo().getNavigationTemplate();

        // navigations are used by a layout
        JspService jsp = (JspService)
            TurbineServices.getInstance().getService(JspService.SERVICE_NAME);
        jsp.handleRequest(data, "/navigations/" + templateName);

        return null;
    }
View Full Code Here

Examples of org.apache.turbine.services.jsp.JspService

     * Stuffs some useful objects into the request so that
     * it is available to the Action module and the Screen module
     */
    protected void doBuildBeforeAction(RunData data) throws Exception
    {
        JspService jsp = (JspService)TurbineServices.getInstance()
            .getService(JspService.SERVICE_NAME);

        jsp.addDefaultObjects(data);
        try
        {
            //We try to set the buffer size from defaults
            data.getResponse().setBufferSize(jsp.getDefaultBufferSize());
        }
        catch (IllegalStateException ise )
        {
            //If the response was already commited, we die silently
            //No logger here?
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.