Examples of VelocityContext


Examples of org.apache.velocity.VelocityContext

        catch (EngineException ee)
        {
            throw new BuildException(ee);
        }

        context = new VelocityContext();

        // Place our set of data models into the context along
        // with the names of the databases as a convenience for now.
        context.put("dataModels", dataModels);
        context.put("databaseNames", databaseNames);
View Full Code Here

Examples of org.apache.velocity.VelocityContext

        restResponse.write(status, content, viewType);
        throw new RenderFinish();
    }

    public void renderHtml(int status, String path, Map result) {
        VelocityContext context = new VelocityContext();
        copyObjectToMap(result, context);
        StringWriter w = new StringWriter();
        Velocity.mergeTemplate(path, "utf-8", context, w);
        restResponse.write(status, w.toString(), ViewType.html);
    }
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.