Package org.apache.tiles.request.freemarker

Examples of org.apache.tiles.request.freemarker.FreemarkerRequestException


        AttributeValueFreemarkerServlet servlet = new AttributeValueFreemarkerServlet();
        try {
            servlet.init(new InitParamsServletConfig(params, applicationContext));
            return new FreemarkerRenderer(servlet);
        } catch (ServletException e) {
            throw new FreemarkerRequestException(
                    "Cannot initialize internal servlet", e);
        }

    }
View Full Code Here


        try {
            servlet.doGet(httpRequest,
                    new ExternalWriterHttpServletResponse(httpResponse,
                            request.getPrintWriter()));
        } catch (ServletException e) {
            throw new FreemarkerRequestException("Exception when rendering a FreeMarker attribute", e);
        }
    }
View Full Code Here

    @Override
    public Enumeration<String> getKeys() {
        try {
            return Collections.<String> enumeration(request.getKnownVariableNames());
        } catch (TemplateModelException e) {
            throw new FreemarkerRequestException("Cannot iterate variable names correctly", e);
        }
    }
View Full Code Here

            if (variable != null) {
                return DeepUnwrap.unwrap(variable);
            }
            return null;
        } catch (TemplateModelException e) {
            throw new FreemarkerRequestException("Cannot get attribute with name '" + key + "'", e);
        }
    }
View Full Code Here

    public void setValue(String key, Object value) {
        try {
            TemplateModel model = request.getObjectWrapper().wrap(value);
            request.setVariable(key, model);
        } catch (TemplateModelException e) {
            throw new FreemarkerRequestException("Error when wrapping an object setting the '" + key + "' attribute", e);
        }
    }
View Full Code Here

        AttributeValueFreemarkerServlet servlet = new AttributeValueFreemarkerServlet();
        try {
            servlet.init(new InitParamsServletConfig(params, applicationContext));
            return new FreemarkerRenderer(servlet);
        } catch (ServletException e) {
            throw new FreemarkerRequestException(
                    "Cannot initialize internal servlet", e);
        }

    }
View Full Code Here

        try {
            servlet.doGet(httpRequest,
                    new ExternalWriterHttpServletResponse(httpResponse,
                            request.getPrintWriter()));
        } catch (ServletException e) {
            throw new FreemarkerRequestException("Exception when rendering a FreeMarker attribute", e);
        }
    }
View Full Code Here

    @Override
    public Enumeration<String> getKeys() {
        try {
            return Collections.<String> enumeration(request.getKnownVariableNames());
        } catch (TemplateModelException e) {
            throw new FreemarkerRequestException("Cannot iterate variable names correctly", e);
        }
    }
View Full Code Here

            if (variable != null) {
                return DeepUnwrap.unwrap(variable);
            }
            return null;
        } catch (TemplateModelException e) {
            throw new FreemarkerRequestException("Cannot get attribute with name '" + key + "'", e);
        }
    }
View Full Code Here

    public void setValue(String key, Object value) {
        try {
            TemplateModel model = request.getObjectWrapper().wrap(value);
            request.setVariable(key, model);
        } catch (TemplateModelException e) {
            throw new FreemarkerRequestException("Error when wrapping an object setting the '" + key + "' attribute", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tiles.request.freemarker.FreemarkerRequestException

Copyright © 2018 www.massapicom. 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.