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


Java JspRuntimeContext类代码示例

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


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

示例1: JspServletWrapper

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的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: initServletContext

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的package包/类
protected void initServletContext(ClassLoader classLoader)
        throws IOException, JasperException {
    // TODO: should we use the Ant Project's log?
    PrintWriter log = new PrintWriter(System.out);
    URL resourceBase = new File(uriRoot).getCanonicalFile().toURI().toURL();
    context = new JspCServletContext(log, resourceBase, classLoader);
    if (isValidateTld()) {
        context.setInitParameter(Constants.XML_VALIDATION_TLD_INIT_PARAM, "true");
    }
    if (isValidateXml()) {
        context.setInitParameter(Constants.XML_VALIDATION_INIT_PARAM, "true");
    }
    context.setInitParameter(Constants.XML_BLOCK_EXTERNAL_INIT_PARAM,
            String.valueOf(isBlockExternal()));

    tldLocationsCache = TldLocationsCache.getInstance(context);
    rctxt = new JspRuntimeContext(context, this);
    jspConfig = new JspConfig(context);
    tagPluginManager = new TagPluginManager(context);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:21,代码来源:JspC.java

示例3: JspServletWrapper

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的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

示例4: JspCompilationContext

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的package包/类
public JspCompilationContext(String jspUri, Options options, ServletContext context, JspServletWrapper jsw,
		JspRuntimeContext rctxt) {

	this.jspUri = canonicalURI(jspUri);
	this.options = options;
	this.jsw = jsw;
	this.context = context;

	this.baseURI = jspUri.substring(0, jspUri.lastIndexOf('/') + 1);
	// hack fix for resolveRelativeURI
	if (baseURI.isEmpty()) {
		baseURI = "/";
	} else if (baseURI.charAt(0) != '/') {
		// strip the base slash since it will be combined with the
		// uriBase to generate a file
		baseURI = "/" + baseURI;
	}
	if (baseURI.charAt(baseURI.length() - 1) != '/') {
		baseURI += '/';
	}

	this.rctxt = rctxt;
	this.tagFileJarUrls = new HashMap<String, JarResource>();
	this.basePackageName = Constants.JSP_PACKAGE_NAME;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:26,代码来源:JspCompilationContext.java

示例5: initServletContext

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的package包/类
protected void initServletContext(ClassLoader classLoader) throws IOException, JasperException {
	// TODO: should we use the Ant Project's log?
	PrintWriter log = new PrintWriter(System.out);
	URL resourceBase = new File(uriRoot).getCanonicalFile().toURI().toURL();
	context = new JspCServletContext(log, resourceBase, classLoader);
	if (isValidateTld()) {
		context.setInitParameter(Constants.XML_VALIDATION_TLD_INIT_PARAM, "true");
	}
	if (isValidateXml()) {
		context.setInitParameter(Constants.XML_VALIDATION_INIT_PARAM, "true");
	}
	context.setInitParameter(Constants.XML_BLOCK_EXTERNAL_INIT_PARAM, String.valueOf(isBlockExternal()));

	tldLocationsCache = TldLocationsCache.getInstance(context);
	rctxt = new JspRuntimeContext(context, this);
	jspConfig = new JspConfig(context);
	tagPluginManager = new TagPluginManager(context);
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:19,代码来源:JspC.java

示例6: JspServletWrapper

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的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

示例7: JspServletWrapper

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的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

示例8: initServletContext

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的package包/类
private void initServletContext() {
    try {
        context =new JspCServletContext
            (new PrintWriter(new OutputStreamWriter(System.out, "UTF-8")),

             new URL("file:" + uriRoot.replace('\\','/') + '/'));
        tldScanner = new TldScanner(context, isValidationEnabled);

        // START GlassFish 750
        taglibs = new ConcurrentHashMap<String, TagLibraryInfo>();
        context.setAttribute(Constants.JSP_TAGLIBRARY_CACHE, taglibs);

        tagFileJarUrls = new ConcurrentHashMap<String, URL>();
        context.setAttribute(Constants.JSP_TAGFILE_JAR_URLS_CACHE,
                             tagFileJarUrls);
        // END GlassFish 750
    } catch (MalformedURLException me) {
        System.out.println("**" + me);
    } catch (UnsupportedEncodingException ex) {
    }
    rctxt = new JspRuntimeContext(context, this);
    jspConfig = new JspConfig(context);
    tagPluginManager = new TagPluginManager(context);
}
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:25,代码来源:JspC.java

示例9: getServletFileNameForJsp

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的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

示例10: initServletContext

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的package包/类
protected void initServletContext() {
    try {
        context =new JspCServletContext
            (new PrintWriter(System.out),
             new URL("file:" + uriRoot.replace('\\','/') + '/'));
        tldLocationsCache = TldLocationsCache.getInstance(context);
    } catch (MalformedURLException me) {
        System.out.println("**" + me);
    }
    if (isValidateTld()) {
        context.setInitParameter(Constants.XML_VALIDATION_TLD_INIT_PARAM, "true");
    }
    if (isValidateXml()) {
        context.setInitParameter(Constants.XML_VALIDATION_INIT_PARAM, "true");
    }
    context.setInitParameter(Constants.XML_BLOCK_EXTERNAL_INIT_PARAM,
            String.valueOf(isBlockExternal()));

    rctxt = new JspRuntimeContext(context, this);
    jspConfig = new JspConfig(context);
    tagPluginManager = new TagPluginManager(context);
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:23,代码来源:JspC.java

示例11: JspCompilationContext

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的package包/类
public JspCompilationContext(String jspUri,
                             Options options,
                             ServletContext context,
                             JspServletWrapper jsw,
                             JspRuntimeContext rctxt) {

    this.jspUri = canonicalURI(jspUri);
    this.options = options;
    this.jsw = jsw;
    this.context = context;

    this.baseURI = jspUri.substring(0, jspUri.lastIndexOf('/') + 1);
    // hack fix for resolveRelativeURI
    if (baseURI.isEmpty()) {
        baseURI = "/";
    } else if (baseURI.charAt(0) != '/') {
        // strip the base slash since it will be combined with the
        // uriBase to generate a file
        baseURI = "/" + baseURI;
    }
    if (baseURI.charAt(baseURI.length() - 1) != '/') {
        baseURI += '/';
    }

    this.rctxt = rctxt;
    this.tagFileJarUrls = new HashMap<String, JarResource>();
    this.basePackageName = Constants.JSP_PACKAGE_NAME;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:29,代码来源:JspCompilationContext.java

示例12: JspCompilationContext

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的package包/类
public JspCompilationContext(String jspUri,
                             boolean isErrPage,
                             Options options,
                             ServletContext context,
                             JspServletWrapper jsw,
                             JspRuntimeContext rctxt) {

    this.jspUri = canonicalURI(jspUri);
    this.isErrPage = isErrPage;
    this.options = options;
    this.jsw = jsw;
    this.context = context;

    this.baseURI = jspUri.substring(0, jspUri.lastIndexOf('/') + 1);
    // hack fix for resolveRelativeURI
    if (baseURI == null) {
        baseURI = "/";
    } else if (baseURI.charAt(0) != '/') {
        // strip the basde slash since it will be combined with the
        // uriBase to generate a file
        baseURI = "/" + baseURI;
    }
    if (baseURI.charAt(baseURI.length() - 1) != '/') {
        baseURI += '/';
    }

    this.rctxt = rctxt;
    this.tagFileJarUrls = new HashMap<String, URL>();
    this.basePackageName = Constants.JSP_PACKAGE_NAME;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:31,代码来源:JspCompilationContext.java

示例13: initServletContext

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的package包/类
protected void initServletContext() {
    try {
        context =new JspCServletContext
            (new PrintWriter(System.out),
             new URL("file:" + uriRoot.replace('\\','/') + '/'));
        tldLocationsCache = new TldLocationsCache(context, true);
    } catch (MalformedURLException me) {
        System.out.println("**" + me);
    }
    rctxt = new JspRuntimeContext(context, this);
    jspConfig = new JspConfig(context);
    tagPluginManager = new TagPluginManager(context);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:JspC.java

示例14: JspServletWrapper

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的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

示例15: JspCompilationContext

import org.apache.jasper.compiler.JspRuntimeContext; //导入依赖的package包/类
private JspCompilationContext(String jspUri, TagInfo tagInfo,
        Options options, ServletContext context, JspServletWrapper jsw,
        JspRuntimeContext rctxt, Jar tagJar, boolean isTagFile) {

    this.jspUri = canonicalURI(jspUri);
    this.options = options;
    this.jsw = jsw;
    this.context = context;

    String baseURI = jspUri.substring(0, jspUri.lastIndexOf('/') + 1);
    // hack fix for resolveRelativeURI
    if (baseURI == null) {
        baseURI = "/";
    } else if (baseURI.charAt(0) != '/') {
        // strip the base slash since it will be combined with the
        // uriBase to generate a file
        baseURI = "/" + baseURI;
    }
    if (baseURI.charAt(baseURI.length() - 1) != '/') {
        baseURI += '/';
    }
    this.baseURI = baseURI;

    this.rctxt = rctxt;
    this.basePackageName = Constants.JSP_PACKAGE_NAME;

    this.tagInfo = tagInfo;
    this.tagJar = tagJar;
    this.isTagFile = isTagFile;
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:31,代码来源:JspCompilationContext.java


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