当前位置: 首页>>代码示例>>Java>>正文


Java JspCompilationContext.compile方法代码示例

本文整理汇总了Java中org.apache.jasper.JspCompilationContext.compile方法的典型用法代码示例。如果您正苦于以下问题:Java JspCompilationContext.compile方法的具体用法?Java JspCompilationContext.compile怎么用?Java JspCompilationContext.compile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.jasper.JspCompilationContext的用法示例。


在下文中一共展示了JspCompilationContext.compile方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkCompile

import org.apache.jasper.JspCompilationContext; //导入方法依赖的package包/类
/**
 * Method used by background thread to check the JSP dependencies
 * registered with this class for JSP's.
 */
public void checkCompile() {

    if (lastCompileCheck < 0) {
        // Checking was disabled
        return;
    }
    long now = System.currentTimeMillis();
    if (now > (lastCompileCheck + (options.getCheckInterval() * 1000L))) {
        lastCompileCheck = now;
    } else {
        return;
    }
    
    Object [] wrappers = jsps.values().toArray();
    for (int i = 0; i < wrappers.length; i++ ) {
        JspServletWrapper jsw = (JspServletWrapper)wrappers[i];
        JspCompilationContext ctxt = jsw.getJspEngineContext();
        // JspServletWrapper also synchronizes on this when
        // it detects it has to do a reload
        synchronized(jsw) {
            try {
                ctxt.compile();
            } catch (FileNotFoundException ex) {
                ctxt.incrementRemoved();
            } catch (Throwable t) {
                ExceptionUtils.handleThrowable(t);
                jsw.getServletContext().log("Background compile failed",
                                            t);
            }
        }
    }

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:38,代码来源:JspRuntimeContext.java

示例2: checkCompile

import org.apache.jasper.JspCompilationContext; //导入方法依赖的package包/类
/**
 * Method used by background thread to check the JSP dependencies
 * registered with this class for JSP's.
 */
public void checkCompile() {

    if (lastCheck < 0) {
        // Checking was disabled
        return;
    }
    long now = System.currentTimeMillis();
    if (now > (lastCheck + (options.getCheckInterval() * 1000L))) {
        lastCheck = now;
    } else {
        return;
    }
    
    Object [] wrappers = jsps.values().toArray();
    for (int i = 0; i < wrappers.length; i++ ) {
        JspServletWrapper jsw = (JspServletWrapper)wrappers[i];
        JspCompilationContext ctxt = jsw.getJspEngineContext();
        // JspServletWrapper also synchronizes on this when
        // it detects it has to do a reload
        synchronized(jsw) {
            try {
                ctxt.compile();
            } catch (FileNotFoundException ex) {
                ctxt.incrementRemoved();
            } catch (Throwable t) {
                jsw.getServletContext().log("Background compile failed",
		t);
            }
        }
    }

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:37,代码来源:JspRuntimeContext.java

示例3: checkCompile

import org.apache.jasper.JspCompilationContext; //导入方法依赖的package包/类
/**
 * Method used by background thread to check the JSP dependencies registered
 * with this class for JSP's.
 */
public void checkCompile() {

	if (lastCompileCheck < 0) {
		// Checking was disabled
		return;
	}
	long now = System.currentTimeMillis();
	if (now > (lastCompileCheck + (options.getCheckInterval() * 1000L))) {
		lastCompileCheck = now;
	} else {
		return;
	}

	Object[] wrappers = jsps.values().toArray();
	for (int i = 0; i < wrappers.length; i++) {
		JspServletWrapper jsw = (JspServletWrapper) wrappers[i];
		JspCompilationContext ctxt = jsw.getJspEngineContext();
		// JspServletWrapper also synchronizes on this when
		// it detects it has to do a reload
		synchronized (jsw) {
			try {
				ctxt.compile();
			} catch (FileNotFoundException ex) {
				ctxt.incrementRemoved();
			} catch (Throwable t) {
				ExceptionUtils.handleThrowable(t);
				jsw.getServletContext().log("Background compile failed", t);
			}
		}
	}

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:37,代码来源:JspRuntimeContext.java

示例4: checkCompile

import org.apache.jasper.JspCompilationContext; //导入方法依赖的package包/类
/**
 * Method used by background thread to check the JSP dependencies
 * registered with this class for JSP's.
 */
public void checkCompile() {

    if (lastCompileCheck < 0) {
        // Checking was disabled
        return;
    }
    long now = System.currentTimeMillis();
    if (now > (lastCompileCheck + (options.getCheckInterval() * 1000L))) {
        lastCompileCheck = now;
    } else {
        return;
    }

    Object [] wrappers = jsps.values().toArray();
    for (int i = 0; i < wrappers.length; i++ ) {
        JspServletWrapper jsw = (JspServletWrapper)wrappers[i];
        JspCompilationContext ctxt = jsw.getJspEngineContext();
        // JspServletWrapper also synchronizes on this when
        // it detects it has to do a reload
        synchronized(jsw) {
            try {
                ctxt.compile();
            } catch (FileNotFoundException ex) {
                ctxt.incrementRemoved();
            } catch (Throwable t) {
                ExceptionUtils.handleThrowable(t);
                jsw.getServletContext().log("Background compile failed",
                                            t);
            }
        }
    }

}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:38,代码来源:JspRuntimeContext.java

示例5: checkCompile

import org.apache.jasper.JspCompilationContext; //导入方法依赖的package包/类
/**
 * Method used by background thread to check the JSP dependencies
 * registered with this class for JSP's.
 */
private void checkCompile() {
    for (JspServletWrapper jsw: jsps.values()) {
        if (jsw.isTagFile()) {
            // Skip tag files in background compiliations, since modified
            // tag files will be recompiled anyway when their client JSP
            // pages are compiled.  This also avoids problems when the
            // tag files and their clients are not modified simultaneously.
            continue;
        }

        JspCompilationContext ctxt = jsw.getJspEngineContext();
        // JspServletWrapper also synchronizes on this when
        // it detects it has to do a reload
        synchronized(jsw) {
            try {
                ctxt.compile();
            } catch (FileNotFoundException ex) {
                ctxt.incrementRemoved();
            } catch (Throwable t) {
                jsw.getServletContext().log(
                    Localizer.getMessage("jsp.error.background.compile"),
                    t);
            }
        }
    }
}
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:31,代码来源:JspRuntimeContext.java


注:本文中的org.apache.jasper.JspCompilationContext.compile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。