Examples of templateDirFile()


Examples of net.csdn.common.env.Environment.templateDirFile()

        HandlerList handlers = new HandlerList();
        if (settings.getAsBoolean("application.static.enable", false)) {
            ResourceHandler resource_handler = new ResourceHandler();
            resource_handler.setDirectoriesListed(false);
            try {
                resource_handler.setBaseResource(Resource.newResource(environment.templateDirFile().getPath() + "/assets/"));
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (settings.getAsBoolean("application.session.enable", false)) {
                SessionManager sessionManager = new HashSessionManager();
View Full Code Here

Examples of net.csdn.common.env.Environment.templateDirFile()

    @Override
    public void load(Settings settings) throws Exception {
        Environment environment = new Environment(settings);
        if (settings.getAsBoolean("application.template.engine.enable", false)) {
            Properties properties = new Properties();
            properties.setProperty("file.resource.loader.path", environment.templateDirFile().getPath());
            properties.setProperty("input.encoding", "utf-8");
            properties.setProperty("output.encoding", "utf-8");
            properties.setProperty("runtime.log", environment.logsFile().getPath() + "/template");
            Velocity.init(properties);
        }
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.