本文整理汇总了Java中org.apache.jasper.Options.getDevelopment方法的典型用法代码示例。如果您正苦于以下问题:Java Options.getDevelopment方法的具体用法?Java Options.getDevelopment怎么用?Java Options.getDevelopment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.jasper.Options
的用法示例。
在下文中一共展示了Options.getDevelopment方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JspRuntimeContext
import org.apache.jasper.Options; //导入方法依赖的package包/类
/**
* Create a JspRuntimeContext for a web application context.
*
* Loads in any previously generated dependencies from file.
*
* @param context ServletContext for web application
*/
public JspRuntimeContext(ServletContext context, Options options) {
this.context = context;
this.options = options;
// Get the parent class loader
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (loader == null) {
loader = this.getClass().getClassLoader();
}
if (log.isDebugEnabled()) {
if (loader != null) {
log.debug(Localizer.getMessage("jsp.message.parent_class_loader_is",
loader.toString()));
} else {
log.debug(Localizer.getMessage("jsp.message.parent_class_loader_is",
"<none>"));
}
}
parentClassLoader = loader;
classpath = initClassPath();
if (context instanceof org.apache.jasper.servlet.JspCServletContext) {
codeSource = null;
permissionCollection = null;
return;
}
if (Constants.IS_SECURITY_ENABLED) {
SecurityHolder holder = initSecurity();
codeSource = holder.cs;
permissionCollection = holder.pc;
} else {
codeSource = null;
permissionCollection = null;
}
// If this web application context is running from a
// directory, start the background compilation thread
String appBase = context.getRealPath("/");
if (!options.getDevelopment()
&& appBase != null
&& options.getCheckInterval() > 0) {
lastCompileCheck = System.currentTimeMillis();
}
if (options.getMaxLoadedJsps() > 0) {
jspQueue = new FastRemovalDequeue<JspServletWrapper>(options.getMaxLoadedJsps());
if (log.isDebugEnabled()) {
log.debug(Localizer.getMessage("jsp.message.jsp_queue_created",
"" + options.getMaxLoadedJsps(), context.getContextPath()));
}
}
/* Init parameter is in seconds, locally we use milliseconds */
jspIdleTimeout = options.getJspIdleTimeout() * 1000;
}
示例2: JspRuntimeContext
import org.apache.jasper.Options; //导入方法依赖的package包/类
/**
* Create a JspRuntimeContext for a web application context.
*
* Loads in any previously generated dependencies from file.
*
* @param context ServletContext for web application
*/
public JspRuntimeContext(ServletContext context, Options options) {
this.context = context;
this.options = options;
// Get the parent class loader
parentClassLoader = Thread.currentThread().getContextClassLoader();
if (parentClassLoader == null) {
parentClassLoader = this.getClass().getClassLoader();
}
if (log.isDebugEnabled()) {
if (parentClassLoader != null) {
log.debug(Localizer.getMessage("jsp.message.parent_class_loader_is",
parentClassLoader.toString()));
} else {
log.debug(Localizer.getMessage("jsp.message.parent_class_loader_is",
"<none>"));
}
}
initClassPath();
if (context instanceof org.apache.jasper.servlet.JspCServletContext) {
return;
}
if (Constants.IS_SECURITY_ENABLED) {
initSecurity();
}
// If this web application context is running from a
// directory, start the background compilation thread
String appBase = context.getRealPath("/");
if (!options.getDevelopment()
&& appBase != null
&& options.getCheckInterval() > 0) {
lastCheck = System.currentTimeMillis();
}
}
示例3: JspRuntimeContext
import org.apache.jasper.Options; //导入方法依赖的package包/类
/**
* Create a JspRuntimeContext for a web application context.
*
* Loads in any previously generated dependencies from file.
*
* @param context
* ServletContext for web application
*/
public JspRuntimeContext(ServletContext context, Options options) {
this.context = context;
this.options = options;
// Get the parent class loader
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (loader == null) {
loader = this.getClass().getClassLoader();
}
if (log.isDebugEnabled()) {
if (loader != null) {
log.debug(Localizer.getMessage("jsp.message.parent_class_loader_is", loader.toString()));
} else {
log.debug(Localizer.getMessage("jsp.message.parent_class_loader_is", "<none>"));
}
}
parentClassLoader = loader;
classpath = initClassPath();
if (context instanceof org.apache.jasper.servlet.JspCServletContext) {
codeSource = null;
permissionCollection = null;
return;
}
if (Constants.IS_SECURITY_ENABLED) {
SecurityHolder holder = initSecurity();
codeSource = holder.cs;
permissionCollection = holder.pc;
} else {
codeSource = null;
permissionCollection = null;
}
// If this web application context is running from a
// directory, start the background compilation thread
String appBase = context.getRealPath("/");
if (!options.getDevelopment() && appBase != null && options.getCheckInterval() > 0) {
lastCompileCheck = System.currentTimeMillis();
}
if (options.getMaxLoadedJsps() > 0) {
jspQueue = new FastRemovalDequeue<JspServletWrapper>(options.getMaxLoadedJsps());
if (log.isDebugEnabled()) {
log.debug(Localizer.getMessage("jsp.message.jsp_queue_created", "" + options.getMaxLoadedJsps(),
context.getContextPath()));
}
}
/* Init parameter is in seconds, locally we use milliseconds */
jspIdleTimeout = options.getJspIdleTimeout() * 1000;
}
示例4: JspRuntimeContext
import org.apache.jasper.Options; //导入方法依赖的package包/类
/**
* Create a JspRuntimeContext for a web application context.
*
* Loads in any previously generated dependencies from file.
*
* @param context ServletContext for web application
*/
public JspRuntimeContext(ServletContext context, Options options) {
this.context = context;
this.options = options;
// Get the parent class loader
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (loader == null) {
loader = this.getClass().getClassLoader();
}
if (log.isDebugEnabled()) {
if (loader != null) {
log.debug(Localizer.getMessage("jsp.message.parent_class_loader_is",
loader.toString()));
} else {
log.debug(Localizer.getMessage("jsp.message.parent_class_loader_is",
"<none>"));
}
}
parentClassLoader = loader;
classpath = initClassPath();
if (context instanceof org.apache.jasper.servlet.JspCServletContext) {
codeSource = null;
permissionCollection = null;
return;
}
if (Constants.IS_SECURITY_ENABLED) {
SecurityHolder holder = initSecurity();
codeSource = holder.cs;
permissionCollection = holder.pc;
} else {
codeSource = null;
permissionCollection = null;
}
// If this web application context is running from a
// directory, start the background compilation thread
String appBase = context.getRealPath("/");
if (!options.getDevelopment()
&& appBase != null
&& options.getCheckInterval() > 0) {
lastCompileCheck = System.currentTimeMillis();
}
if (options.getMaxLoadedJsps() > 0) {
jspQueue = new FastRemovalDequeue<>(options.getMaxLoadedJsps());
if (log.isDebugEnabled()) {
log.debug(Localizer.getMessage("jsp.message.jsp_queue_created",
"" + options.getMaxLoadedJsps(), context.getContextPath()));
}
}
/* Init parameter is in seconds, locally we use milliseconds */
jspIdleTimeout = options.getJspIdleTimeout() * 1000;
}
示例5: JspRuntimeContext
import org.apache.jasper.Options; //导入方法依赖的package包/类
/**
* Create a JspRuntimeContext for a web application context.
*
* Loads in any previously generated dependencies from file.
*
* @param context ServletContext for web application
*/
public JspRuntimeContext(ServletContext context, Options options) {
this.context = context;
this.options = options;
int hashSize = options.getInitialCapacity();
jsps = new ConcurrentHashMap<String, JspServletWrapper>(hashSize);
bytecodes = new ConcurrentHashMap<String, byte[]>(hashSize);
bytecodeBirthTimes = new ConcurrentHashMap<String, Long>(hashSize);
packageMap = new ConcurrentHashMap<String, Map<String, JavaFileObject>>();
if (log.isLoggable(Level.FINEST)) {
ClassLoader parentClassLoader = getParentClassLoader();
if (parentClassLoader != null) {
log.finest(Localizer.getMessage("jsp.message.parent_class_loader_is",
parentClassLoader.toString()));
} else {
log.finest(Localizer.getMessage("jsp.message.parent_class_loader_is",
"<none>"));
}
}
initClassPath();
if (context instanceof org.apache.jasper.servlet.JspCServletContext) {
return;
}
if (Constants.IS_SECURITY_ENABLED) {
initSecurity();
}
// If this web application context is running from a
// directory, start the background compilation thread
String appBase = context.getRealPath("/");
if (!options.getDevelopment()
&& appBase != null
&& options.getCheckInterval() > 0
&& !options.getUsePrecompiled()) {
if (appBase.endsWith(File.separator) ) {
appBase = appBase.substring(0,appBase.length()-1);
}
String directory =
appBase.substring(appBase.lastIndexOf(File.separator));
threadName = threadName + "[" + directory + "]";
threadStart();
}
}