Package org.apache.velocity.tools.view

Examples of org.apache.velocity.tools.view.ViewContext


    @Deprecated
    public void init(Object obj)
    {
        if (obj instanceof ViewContext)
        {
            ViewContext ctx = (ViewContext)obj;
            this.context = ctx.getVelocityContext();
            this.request = ctx.getRequest();
            this.session = request.getSession(false);
            this.application = ctx.getServletContext();
        }
    }
View Full Code Here


    @Deprecated
    public void init(Object obj)
    {
        if (obj instanceof ViewContext)
        {
            ViewContext ctx = (ViewContext)obj;
            setRequest(ctx.getRequest());
            setResponse(ctx.getResponse());
            setServletContext(ctx.getServletContext());
            if (ctx.getVelocityEngine() != null)
            {
                setLog(ctx.getVelocityEngine().getLog());
            }
        }
    }
View Full Code Here

    @Deprecated
    public void init(Object obj)
    {
        if (obj instanceof ViewContext)
        {
            ViewContext ctx = (ViewContext)obj;
            setRequest(ctx.getRequest());
            setResponse(ctx.getResponse());
            setServletContext(ctx.getServletContext());
            setLog(ctx.getVelocityEngine().getLog());
        }
    }
View Full Code Here

    private Map<String, Object>    params;

    /** {@inheritDoc} */
    @Override
    public Request createRequest() {
        ViewContext viewContext = (ViewContext) context.getInternalUserContext();
        HttpServletRequest request = viewContext.getRequest();
        HttpServletResponse response = viewContext.getResponse();
        ServletContext servletContext = viewContext.getServletContext();
        return VelocityRequest.createVelocityRequest(ServletUtil.getApplicationContext(servletContext),
                                                     request,
                                                     response,
                                                     context,
                                                     writer);
View Full Code Here

TOP

Related Classes of org.apache.velocity.tools.view.ViewContext

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.