Examples of JspService


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)
        {
            Log.error(e);
View Full Code Here

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

     * it is available to the Action module and the Screen module
     */ 
    protected void doBuildBeforeAction(RunData data) throws Exception
    {
        super.doBuildBeforeAction( data);
        JspService jsp = (JspService)TurbineServices.getInstance()
            .getService(JspService.SERVICE_NAME);
               
        jsp.addDefaultObjects(data);

        data.getResponse().setBufferSize(jsp.getDefaultBufferSize());

        // FIXME: this tools are now in TR.p file, as standard request tools instantiated by turbine.
        // All tools but jnavigation are there, jnavigation need to be instantiated here
        // because TemplateNavigation in which depends does have a no args constructor..and
        // turbine need one to be able to instantiate such class as request tool
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

        {
            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

     * 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);
        data.getResponse().setBufferSize(jsp.getDefaultBufferSize());
    }
View Full Code Here

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

            .setAttribute("navigation", new JspNavigation(data));

        // Grab the layout template set in the TemplatePage.
        String templateName = data.getTemplateInfo().getLayoutTemplate();
        // Finally, generate the layout template and output to the response
        JspService jsp = (JspService)TurbineServices.getInstance()
            .getService(JspService.SERVICE_NAME);
        jsp.handleRequest(data, "/layouts" + templateName, true);
    }
View Full Code Here

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

     * 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

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

     * 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.