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


Java JspCompilationContext类代码示例

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


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

示例1: JspServletWrapper

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

import org.apache.jasper.JspCompilationContext; //导入依赖的package包/类
public static InputStream getInputStream(String fname, JarFile jarFile,
        JspCompilationContext ctxt, ErrorDispatcher err)
        throws JasperException, IOException {

    InputStream in = null;

    if (jarFile != null) {
        String jarEntryName = fname.substring(1, fname.length());
        ZipEntry jarEntry = jarFile.getEntry(jarEntryName);
        if (jarEntry == null) {
            throw new FileNotFoundException(Localizer.getMessage(
                    "jsp.error.file.not.found", fname));
        }
        in = jarFile.getInputStream(jarEntry);
    } else {
        in = ctxt.getResourceAsStream(fname);
    }

    if (in == null) {
        throw new FileNotFoundException(Localizer.getMessage(
                "jsp.error.file.not.found", fname));
    }

    return in;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:26,代码来源:JspUtil.java

示例3: JspReader

import org.apache.jasper.JspCompilationContext; //导入依赖的package包/类
/**
 * Constructor: same as above constructor but with initialized reader
 * to the file given.
 */
public JspReader(JspCompilationContext ctxt,
                 String fname,
                 String encoding,
                 InputStreamReader reader,
                 ErrorDispatcher err)
        throws JasperException {

    this.context = ctxt;
    this.err = err;
    sourceFiles = new Vector<String>();
    currFileId = 0;
    size = 0;
    singleFile = false;
    pushFile(fname, encoding, reader);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:20,代码来源:JspReader.java

示例4: JspServletWrapper

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

示例5: getInputStream

import org.apache.jasper.JspCompilationContext; //导入依赖的package包/类
public static InputStream getInputStream(String fname, JarFile jarFile,
                     JspCompilationContext ctxt,
                     ErrorDispatcher err)
    throws JasperException, IOException {

    InputStream in = null;

if (jarFile != null) {
    String jarEntryName = fname.substring(1, fname.length());
    ZipEntry jarEntry = jarFile.getEntry(jarEntryName);
    if (jarEntry == null) {
    err.jspError("jsp.error.file.not.found", fname);
    }
    in = jarFile.getInputStream(jarEntry);
} else {
    in = ctxt.getResourceAsStream(fname);
}

if (in == null) {
    err.jspError("jsp.error.file.not.found", fname);
}

return in;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:25,代码来源:JspUtil.java

示例6: JspReader

import org.apache.jasper.JspCompilationContext; //导入依赖的package包/类
/**
 * Constructor: same as above constructor but with initialized reader
 * to the file given.
 */
public JspReader(JspCompilationContext ctxt,
                 String fname,
                 String encoding,
                 InputStreamReader reader,
                 ErrorDispatcher err)
        throws JasperException, FileNotFoundException {

    this.context = ctxt;
    this.err = err;
    sourceFiles = new Vector();
    currFileId = 0;
    size = 0;
    singleFile = false;
    pushFile(fname, encoding, reader);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:20,代码来源:JspReader.java

示例7: getInputStream

import org.apache.jasper.JspCompilationContext; //导入依赖的package包/类
public static InputStream getInputStream(String fname, JarFile jarFile, JspCompilationContext ctxt,
		ErrorDispatcher err) throws JasperException, IOException {

	InputStream in = null;

	if (jarFile != null) {
		String jarEntryName = fname.substring(1, fname.length());
		ZipEntry jarEntry = jarFile.getEntry(jarEntryName);
		if (jarEntry == null) {
			throw new FileNotFoundException(Localizer.getMessage("jsp.error.file.not.found", fname));
		}
		in = jarFile.getInputStream(jarEntry);
	} else {
		in = ctxt.getResourceAsStream(fname);
	}

	if (in == null) {
		throw new FileNotFoundException(Localizer.getMessage("jsp.error.file.not.found", fname));
	}

	return in;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:23,代码来源:JspUtil.java

示例8: JspServletWrapper

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

示例9: getInputStream

import org.apache.jasper.JspCompilationContext; //导入依赖的package包/类
public static InputStream getInputStream(String fname, Jar jar,
        JspCompilationContext ctxt) throws IOException {

    InputStream in = null;

    if (jar != null) {
        String jarEntryName = fname.substring(1, fname.length());
        in = jar.getInputStream(jarEntryName);
    } else {
        in = ctxt.getResourceAsStream(fname);
    }

    if (in == null) {
        throw new FileNotFoundException(Localizer.getMessage(
                "jsp.error.file.not.found", fname));
    }

    return in;
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:20,代码来源:JspUtil.java

示例10: getReader

import org.apache.jasper.JspCompilationContext; //导入依赖的package包/类
static InputStreamReader getReader(String fname, String encoding,
        Jar jar, JspCompilationContext ctxt, ErrorDispatcher err, int skip)
        throws JasperException, IOException {

    InputStreamReader reader = null;
    InputStream in = getInputStream(fname, jar, ctxt);
    for (int i = 0; i < skip; i++) {
        in.read();
    }
    try {
        reader = new InputStreamReader(in, encoding);
    } catch (UnsupportedEncodingException ex) {
        err.jspError("jsp.error.unsupported.encoding", encoding);
    }

    return reader;
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:18,代码来源:JspUtil.java

示例11: JspServletWrapper

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

示例12: getInputStream

import org.apache.jasper.JspCompilationContext; //导入依赖的package包/类
public static InputStream getInputStream(String fname, JarFile jarFile,
				     JspCompilationContext ctxt,
				     ErrorDispatcher err)
	throws JasperException, IOException {

       InputStream in = null;

if (jarFile != null) {
    String jarEntryName = fname.substring(1, fname.length());
    ZipEntry jarEntry = jarFile.getEntry(jarEntryName);
    if (jarEntry == null) {
	err.jspError("jsp.error.file.not.found", fname);
    }
    in = jarFile.getInputStream(jarEntry);
} else {
    in = ctxt.getResourceAsStream(fname);
}

if (in == null) {
    err.jspError("jsp.error.file.not.found", fname);
}

return in;
   }
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:25,代码来源:JspUtil.java

示例13: getReader

import org.apache.jasper.JspCompilationContext; //导入依赖的package包/类
static InputStreamReader getReader(String fname, String encoding,
			       JarFile jarFile,
			       JspCompilationContext ctxt,
			       ErrorDispatcher err)
	throws JasperException, IOException {

       InputStreamReader reader = null;
InputStream in = getInputStream(fname, jarFile, ctxt, err);

try {
           reader = new InputStreamReader(in, encoding);
} catch (UnsupportedEncodingException ex) {
    err.jspError("jsp.error.unsupported.encoding", encoding);
}

return reader;
   }
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:18,代码来源:JspUtil.java

示例14: getServletFileNameForJsp

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

示例15: getReader

import org.apache.jasper.JspCompilationContext; //导入依赖的package包/类
static InputStreamReader getReader(String fname, String encoding,
        JarFile jarFile, JspCompilationContext ctxt, ErrorDispatcher err,
        int skip) throws JasperException, IOException {

    InputStreamReader reader = null;
    InputStream in = getInputStream(fname, jarFile, ctxt, err);
    for (int i = 0; i < skip; i++) {
        in.read();
    }
    try {
        reader = new InputStreamReader(in, encoding);
    } catch (UnsupportedEncodingException ex) {
        err.jspError("jsp.error.unsupported.encoding", encoding);
    }

    return reader;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:18,代码来源:JspUtil.java


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