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


Java Options类代码示例

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


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

示例1: JspServletWrapper

import org.apache.jasper.Options; //导入依赖的package包/类
public JspServletWrapper(ServletContext servletContext,
                         Options options,
                         String tagFilePath,
                         TagInfo tagInfo,
                         JspRuntimeContext rctxt,
                         JarResource tagJarResource) {

    this.isTagFile = true;
    this.config = null;        // not used
    this.options = options;
    this.jspUri = tagFilePath;
    this.tripCount = 0;
    unloadByCount = options.getMaxLoadedJsps() > 0 ? true : false;
    unloadByIdle = options.getJspIdleTimeout() > 0 ? true : false;
    unloadAllowed = unloadByCount || unloadByIdle ? true : false;
    ctxt = new JspCompilationContext(jspUri, tagInfo, options,
                                     servletContext, this, rctxt,
                                     tagJarResource);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:20,代码来源:JspServletWrapper.java

示例2: JspServletWrapper

import org.apache.jasper.Options; //导入依赖的package包/类
public JspServletWrapper(ServletContext servletContext,
		     Options options,
		     String tagFilePath,
		     TagInfo tagInfo,
		     JspRuntimeContext rctxt,
		     URL tagFileJarUrl)
    throws JasperException {

this.isTagFile = true;
       this.config = null;	// not used
       this.options = options;
this.jspUri = tagFilePath;
this.tripCount = 0;
       ctxt = new JspCompilationContext(jspUri, tagInfo, options,
				 servletContext, this, rctxt,
				 tagFileJarUrl);
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:18,代码来源:JspServletWrapper.java

示例3: JspServletWrapper

import org.apache.jasper.Options; //导入依赖的package包/类
public JspServletWrapper(ServletContext servletContext,
                         Options options,
                         String tagFilePath,
                         TagInfo tagInfo,
                         JspRuntimeContext rctxt,
                         Jar tagJar) {

    this.isTagFile = true;
    this.config = null;        // not used
    this.options = options;
    this.jspUri = tagFilePath;
    this.tripCount = 0;
    unloadByCount = options.getMaxLoadedJsps() > 0 ? true : false;
    unloadByIdle = options.getJspIdleTimeout() > 0 ? true : false;
    unloadAllowed = unloadByCount || unloadByIdle ? true : false;
    ctxt = new JspCompilationContext(jspUri, tagInfo, options,
                                     servletContext, this, rctxt,
                                     tagJar);
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:20,代码来源:JspServletWrapper.java

示例4: JspServletWrapper

import org.apache.jasper.Options; //导入依赖的package包/类
JspServletWrapper(ServletConfig config, Options options, String jspUri,
                     boolean isErrorPage, JspRuntimeContext rctxt)
           throws JasperException {

this.isTagFile = false;
       this.config = config;
       this.options = options;
       this.jspUri = jspUri;
       this.jspProbeEmitter = (JspProbeEmitter)
           config.getServletContext().getAttribute(
               "org.glassfish.jsp.monitor.probeEmitter");

       ctxt = new JspCompilationContext(jspUri, isErrorPage, options,
				 config.getServletContext(),
				 this, rctxt);
       // START PWC 6468930
       String jspFilePath = ctxt.getRealPath(jspUri);
       if (jspFilePath != null) {
           jspFile = new File(jspFilePath);
       }
       // END PWC 6468930
   }
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:23,代码来源:JspServletWrapper.java

示例5: getServletFileNameForJsp

import org.apache.jasper.Options; //导入依赖的package包/类
@Override
public String getServletFileNameForJsp(Context context, String jspName) {
  String servletName = null;

  ServletConfig servletConfig = (ServletConfig) context.findChild("jsp");
  if (servletConfig != null) {
    ServletContext sctx = context.getServletContext();
    Options opt = new EmbeddedServletOptions(servletConfig, sctx);
    JspRuntimeContext jrctx = new JspRuntimeContext(sctx, opt);
    JspCompilationContext jcctx = createJspCompilationContext(jspName, opt, sctx, jrctx, null);
    servletName = jcctx.getServletJavaFileName();
  } else {
    logger.error(NO_JSP_SERVLET, context.getName());
  }
  return servletName;
}
 
开发者ID:psi-probe,项目名称:psi-probe,代码行数:17,代码来源:AbstractTomcatContainer.java

示例6: handleContext

import org.apache.jasper.Options; //导入依赖的package包/类
@Override
protected ModelAndView handleContext(String contextName, Context context,
    HttpServletRequest request, HttpServletResponse response) throws Exception {

  String jspName = ServletRequestUtils.getStringParameter(request, "source", null);
  ServletContext sctx = context.getServletContext();
  ServletConfig scfg = (ServletConfig) context.findChild("jsp");
  Options opt = new EmbeddedServletOptions(scfg, sctx);
  String encoding = opt.getJavaEncoding();
  String content = null;

  if (jspName != null) {
    String servletName =
        getContainerWrapper().getTomcatContainer().getServletFileNameForJsp(context, jspName);

    if (servletName != null) {
      File servletFile = new File(servletName);
      if (servletFile.exists()) {
        try (FileInputStream fis = new FileInputStream(servletFile)) {
          content = Utils.highlightStream(jspName, fis, "java", encoding);
        }
      }
    }
  }
  return new ModelAndView(getViewName(), "content", content);
}
 
开发者ID:psi-probe,项目名称:psi-probe,代码行数:27,代码来源:ViewServletSourceController.java

示例7: handleContext

import org.apache.jasper.Options; //导入依赖的package包/类
protected ModelAndView handleContext(String contextName, Context context,
                                     HttpServletRequest request, HttpServletResponse response) throws Exception {

    String jspName = ServletRequestUtils.getStringParameter(request, "source", null);
    ServletContext sctx = context.getServletContext();
    ServletConfig scfg = (ServletConfig) context.findChild("jsp");
    Options opt = new EmbeddedServletOptions(scfg, sctx);
    String encoding = opt.getJavaEncoding();
    String content = null;

    if (jspName != null) {
        String servletName = getContainerWrapper().getTomcatContainer().getServletFileNameForJsp(context, jspName);
        if (servletName != null) {
            File servletFile = new File(servletName);
            if (servletFile.exists()) {
                FileInputStream fis = new FileInputStream(servletFile);
                try {
                    content = Utils.highlightStream(jspName, fis, "java", encoding);
                } finally {
                    fis.close();
                }
            }
        }
    }
    return new ModelAndView(getViewName(), "content", content);
}
 
开发者ID:andresol,项目名称:psi-probe-plus,代码行数:27,代码来源:ViewServletSourceController.java

示例8: JspServletWrapper

import org.apache.jasper.Options; //导入依赖的package包/类
public JspServletWrapper(ServletConfig config, Options options, String jspUri, JspRuntimeContext rctxt) {

		this.isTagFile = false;
		this.config = config;
		this.options = options;
		this.jspUri = jspUri;
		unloadByCount = options.getMaxLoadedJsps() > 0 ? true : false;
		unloadByIdle = options.getJspIdleTimeout() > 0 ? true : false;
		unloadAllowed = unloadByCount || unloadByIdle ? true : false;
		ctxt = new JspCompilationContext(jspUri, options, config.getServletContext(), this, rctxt);
	}
 
开发者ID:how2j,项目名称:lazycat,代码行数:12,代码来源:JspServletWrapper.java

示例9: createJspCompilationContext

import org.apache.jasper.Options; //导入依赖的package包/类
@Override
protected JspCompilationContext createJspCompilationContext(String name, Options opt,
    ServletContext sctx, JspRuntimeContext jrctx, ClassLoader classLoader) {

  JspCompilationContext jcctx = new JspCompilationContext(name, opt, sctx, null, jrctx);
  jcctx.setClassLoader(classLoader);
  return jcctx;
}
 
开发者ID:psi-probe,项目名称:psi-probe,代码行数:9,代码来源:Tomcat70ContainerAdapter.java

示例10: getServletFileNameForJsp

import org.apache.jasper.Options; //导入依赖的package包/类
public String getServletFileNameForJsp(Context context, String jspName) {
    String servletName = null;

    ServletConfig servletConfig = (ServletConfig) context.findChild("jsp");
    if (servletConfig != null) {
        ServletContext sctx = context.getServletContext();
        Options opt = new EmbeddedServletOptions(servletConfig, sctx);
        JspRuntimeContext jrctx = new JspRuntimeContext(sctx, opt);
        JspCompilationContext jcctx = createJspCompilationContext(jspName, false, opt, sctx, jrctx, null);
        servletName = jcctx.getServletJavaFileName();
    } else {
        logger.error("Context " + context.getName() + " does not have \"jsp\" servlet");
    }
    return servletName;
}
 
开发者ID:andresol,项目名称:psi-probe-plus,代码行数:16,代码来源:AbstractTomcatContainer.java

示例11: 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;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:67,代码来源:JspRuntimeContext.java

示例12: 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();
       }                                            
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:48,代码来源:JspRuntimeContext.java

示例13: 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;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:64,代码来源:JspRuntimeContext.java

示例14: 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;
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:67,代码来源:JspRuntimeContext.java

示例15: PluginJspServletWrapper

import org.apache.jasper.Options; //导入依赖的package包/类
public PluginJspServletWrapper(ServletConfig servletConfig, Options options,
		String jspUri, ResourceWrapper pluginResourceWrapper, JspRuntimeContext rctxt)
		throws JasperException {
	super(servletConfig, options, jspUri, false, rctxt);
	this.pluginResourceWrapper= pluginResourceWrapper;
}
 
开发者ID:balancebeam,项目名称:puzzle,代码行数:7,代码来源:PluginJspServletWrapper.java


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