Package org.jaggeryjs.scriptengine.engine

Examples of org.jaggeryjs.scriptengine.engine.JaggeryContext.addProperty()


            engine = CommonManager.getInstance().getEngine();
            cx = engine.enterContext();
            String scriptPath = getScriptPath(request);
            OutputStream out = response.getOutputStream();
            context = createJaggeryContext(cx, out, scriptPath, request, response);
            context.addProperty(FileHostObject.JAVASCRIPT_FILE_MANAGER,
                    new WebAppFileManager(request.getServletContext()));

            if (ModuleManager.isModuleRefreshEnabled()) {
                //reload init scripts
                InputStream jaggeryConf = servletContext.getResourceAsStream(JaggeryCoreConstants.JAGGERY_CONF_FILE);
View Full Code Here


    private static JaggeryContext createJaggeryContext(Context cx, OutputStream out, String scriptPath,
                                                       HttpServletRequest request, HttpServletResponse response) {
        ServletContext servletContext = request.getServletContext();
        JaggeryContext context = clonedJaggeryContext(servletContext);
        CommonManager.setJaggeryContext(context);
        context.addProperty(SERVLET_REQUEST, request);
        context.addProperty(SERVLET_RESPONSE, response);
        CommonManager.getCallstack(context).push(scriptPath);
        CommonManager.getIncludes(context).put(scriptPath, true);
        context.addProperty(CommonManager.JAGGERY_OUTPUT_STREAM, out);
        defineProperties(cx, context, context.getScope());
View Full Code Here

                                                       HttpServletRequest request, HttpServletResponse response) {
        ServletContext servletContext = request.getServletContext();
        JaggeryContext context = clonedJaggeryContext(servletContext);
        CommonManager.setJaggeryContext(context);
        context.addProperty(SERVLET_REQUEST, request);
        context.addProperty(SERVLET_RESPONSE, response);
        CommonManager.getCallstack(context).push(scriptPath);
        CommonManager.getIncludes(context).put(scriptPath, true);
        context.addProperty(CommonManager.JAGGERY_OUTPUT_STREAM, out);
        defineProperties(cx, context, context.getScope());
        return context;
View Full Code Here

        CommonManager.setJaggeryContext(context);
        context.addProperty(SERVLET_REQUEST, request);
        context.addProperty(SERVLET_RESPONSE, response);
        CommonManager.getCallstack(context).push(scriptPath);
        CommonManager.getIncludes(context).put(scriptPath, true);
        context.addProperty(CommonManager.JAGGERY_OUTPUT_STREAM, out);
        defineProperties(cx, context, context.getScope());
        return context;
    }

    protected static ScriptCachingContext getScriptCachingContext(HttpServletRequest request, String scriptPath)
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.