Save This Page
Home » apache-tomcat-6.0.26-src » org.apache » jasper » [javadoc | source]
org.apache.jasper
public class: JspCompilationContext [javadoc | source]
java.lang.Object
   org.apache.jasper.JspCompilationContext
A place holder for various things that are used through out the JSP engine. This is a per-request/per-context data structure. Some of the instance variables are set at different points. Most of the path-related stuff is here - mangling names, versions, dirs, loading resources and dealing with uris.
Field Summary
protected  Log log     
protected  Map<String, URL> tagFileJarUrls     
protected  boolean isPackagedTagFile     
protected  String className     
protected  String jspUri     
protected  boolean isErrPage     
protected  String basePackageName     
protected  String derivedPackageName     
protected  String servletJavaFileName     
protected  String javaPath     
protected  String classFileName     
protected  String contentType     
protected  ServletWriter writer     
protected  Options options     
protected  JspServletWrapper jsw     
protected  Compiler jspCompiler     
protected  String classPath     
protected  String baseURI     
protected  String outputDir     
protected  ServletContext context     
protected  URLClassLoader loader     
protected  JspRuntimeContext rctxt     
protected volatile  int removed     
protected  URLClassLoader jspLoader     
protected  URL baseUrl     
protected  Class servletClass     
protected  boolean isTagFile     
protected  boolean protoTypeMode     
protected  TagInfo tagInfo     
protected  URL tagFileJarUrl     
static  Object outputDirLock     
Constructor:
 public JspCompilationContext(String jspUri,
    boolean isErrPage,
    Options options,
    ServletContext context,
    JspServletWrapper jsw,
    JspRuntimeContext rctxt) 
 public JspCompilationContext(String tagfile,
    TagInfo tagInfo,
    Options options,
    ServletContext context,
    JspServletWrapper jsw,
    JspRuntimeContext rctxt,
    URL tagFileJarUrl) 
Method from org.apache.jasper.JspCompilationContext Summary:
canonicalURI,   checkOutputDir,   compile,   createCompiler,   createCompiler,   createOutputDir,   getClassFileName,   getClassLoader,   getClassPath,   getCompiler,   getContentType,   getDerivedPackageName,   getJavaPath,   getJspFile,   getJspLoader,   getOptions,   getOutputDir,   getRealPath,   getResource,   getResourceAsStream,   getResourcePaths,   getRuntimeContext,   getServletClassName,   getServletContext,   getServletJavaFileName,   getServletPackageName,   getTagFileJarUrl,   getTagFileJarUrl,   getTagInfo,   getTldLocation,   getWriter,   incrementRemoved,   isErrorPage,   isPathSeparator,   isPrototypeMode,   isRemoved,   isTagFile,   keepGenerated,   load,   makeOutputDir,   resolveRelativeUri,   setClassLoader,   setClassPath,   setContentType,   setErrorPage,   setPrototypeMode,   setServletClassName,   setServletPackageName,   setTagFileJarUrl,   setTagInfo,   setWriter
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jasper.JspCompilationContext Detail:
 protected static final String canonicalURI(String s) 
 public  void checkOutputDir() 
 public  void compile() throws JasperException, FileNotFoundException 
 public Compiler createCompiler() throws JasperException 
    Create a "Compiler" object based on some init param data. This is not done yet. Right now we're just hardcoding the actual compilers that are created.
 protected Compiler createCompiler(String className) 
 protected  void createOutputDir() 
 public String getClassFileName() 
 public ClassLoader getClassLoader() 
    What class loader to use for loading classes while compiling this JSP?
 public String getClassPath() 
    The classpath that is passed off to the Java compiler.
 public Compiler getCompiler() 
 public String getContentType() 
    Get the content type of this JSP. Content type includes content type and encoding.
 protected String getDerivedPackageName() 
 public String getJavaPath() 
    Path of the Java file relative to the work directory.
 public String getJspFile() 
    Path of the JSP URI. Note that this is not a file name. This is the context rooted URI of the JSP file.
 public ClassLoader getJspLoader() 
 public Options getOptions() 
    Get hold of the Options object for this context.
 public String getOutputDir() 
    The output directory to generate code into. The output directory is make up of the scratch directory, which is provide in Options, plus the directory derived from the package name.
 public String getRealPath(String path) 
    Gets the actual path of a URI relative to the context of the compilation.
 public URL getResource(String res) throws MalformedURLException 
 public InputStream getResourceAsStream(String res) 
    Gets a resource as a stream, relative to the meanings of this context's implementation.
 public Set getResourcePaths(String path) 
 public JspRuntimeContext getRuntimeContext() 
 public String getServletClassName() 
    Just the class name (does not include package name) of the generated class.
 public ServletContext getServletContext() 
 public String getServletJavaFileName() 
    Full path name of the Java file into which the servlet is being generated.
 public String getServletPackageName() 
    Package name for the generated class is make up of the base package name, which is user settable, and the derived package name. The derived package name directly mirrors the file heirachy of the JSP page.
 public URL getTagFileJarUrl() 
    Returns the JAR file in which the tag file for which this JspCompilationContext was created is packaged, or null if this JspCompilationContext does not correspond to a tag file, or if the corresponding tag file is not packaged in a JAR.
 public URL getTagFileJarUrl(String tagFile) 
    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 TagInfo getTagInfo() 
 public String[] getTldLocation(String uri) throws JasperException 
    Gets the 'location' of the TLD associated with the given taglib 'uri'.
 public ServletWriter getWriter() 
    Where is the servlet being generated?
 public  void incrementRemoved() 
 public boolean isErrorPage() 
    Are we processing something that has been declared as an errorpage?
 protected static final boolean isPathSeparator(char c) 
 public boolean isPrototypeMode() 
    True if we are compiling a tag file in prototype mode. ie we only generate codes with class for the tag handler with empty method bodies.
 public boolean isRemoved() 
 public boolean isTagFile() 
 public boolean keepGenerated() 
    Are we keeping generated code around?
 public Class load() throws JasperException, FileNotFoundException 
 protected boolean makeOutputDir() 
 public String resolveRelativeUri(String uri) 
    Get the full value of a URI relative to this compilations context uses current file as the base.
 public  void setClassLoader(URLClassLoader loader) 
 public  void setClassPath(String classPath) 
    The classpath that is passed off to the Java compiler.
 public  void setContentType(String contentType) 
 public  void setErrorPage(boolean isErrPage) 
 public  void setPrototypeMode(boolean pm) 
 public  void setServletClassName(String className) 
 public  void setServletPackageName(String servletPackageName) 
    The package name into which the servlet class is generated.
 public  void setTagFileJarUrl(String tagFile,
    URL tagFileURL) 
 public  void setTagInfo(TagInfo tagi) 
 public  void setWriter(ServletWriter writer)