本文整理汇总了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);
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}