本文整理汇总了Java中org.apache.jasper.compiler.JarResource类的典型用法代码示例。如果您正苦于以下问题:Java JarResource类的具体用法?Java JarResource怎么用?Java JarResource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JarResource类属于org.apache.jasper.compiler包,在下文中一共展示了JarResource类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JspServletWrapper
import org.apache.jasper.compiler.JarResource; //导入依赖的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: JspCompilationContext
import org.apache.jasper.compiler.JarResource; //导入依赖的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;
}
示例3: getResource
import org.apache.jasper.compiler.JarResource; //导入依赖的package包/类
public URL getResource(String res) throws MalformedURLException {
URL result = null;
if (res.startsWith("/META-INF/")) {
// This is a tag file packaged in a jar that is being compiled
JarResource jarResource = tagFileJarUrls.get(res);
if (jarResource == null) {
jarResource = tagJarResource;
}
if (jarResource != null) {
result = jarResource.getEntry(res.substring(1));
} else {
// May not be in a JAR in some IDE environments
result = context.getResource(canonicalURI(res));
}
} else if (res.startsWith("jar:jndi:")) {
// This is a tag file packaged in a jar that is being checked
// for a dependency
result = new URL(res);
} else {
result = context.getResource(canonicalURI(res));
}
return result;
}
示例4: JspCompilationContext
import org.apache.jasper.compiler.JarResource; //导入依赖的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;
}
示例5: JspServletWrapper
import org.apache.jasper.compiler.JarResource; //导入依赖的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);
}
示例6: JspCompilationContext
import org.apache.jasper.compiler.JarResource; //导入依赖的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 == 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.rctxt = rctxt;
this.tagFileJarUrls = new HashMap<String, JarResource>();
this.basePackageName = Constants.JSP_PACKAGE_NAME;
}
示例7: setTagFileJarResource
import org.apache.jasper.compiler.JarResource; //导入依赖的package包/类
public void setTagFileJarResource(String tagFile, JarResource jarResource) {
this.tagFileJarUrls.put(tagFile, jarResource);
}
示例8: setTagFileJarResource
import org.apache.jasper.compiler.JarResource; //导入依赖的package包/类
public void setTagFileJarResource(String tagFile, JarResource jarResource) {
this.tagFileJarUrls.put(tagFile, jarResource);
}
示例9: getTagFileJarResource
import org.apache.jasper.compiler.JarResource; //导入依赖的package包/类
/**
* Returns the tag-file-name-to-JAR-file map of this compilation unit,
* which maps tag file names to the JAR files in which the tag files are
* packaged.
*
* The map is populated when parsing the tag-file elements of the TLDs
* of any imported taglibs.
*/
public JarResource getTagFileJarResource(String tagFile) {
return this.tagFileJarUrls.get(tagFile);
}
示例10: getTagFileJarResource
import org.apache.jasper.compiler.JarResource; //导入依赖的package包/类
/**
* Returns the tag-file-name-to-JAR-file map of this compilation unit, which
* maps tag file names to the JAR files in which the tag files are packaged.
*
* The map is populated when parsing the tag-file elements of the TLDs of
* any imported taglibs.
*/
public JarResource getTagFileJarResource(String tagFile) {
return this.tagFileJarUrls.get(tagFile);
}