Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jasper
Interface JspCompilationContext

All Known Implementing Classes:
  CommandLineContext, JasperEngineContext, JspEngineContext

public interface 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. JspLoader creates this object and passes this off to the "compiler" subsystem, which then initializes the rest of the variables.

Author:
  Anil K. Vijendran, Harish Prabandham

Method Summary
`void` | `addJar(java.lang.String jar)` Add a jar to the classpath used by the loader
`Compiler` | `createCompiler()` Create a "Compiler" object based on some init param data.
`java.lang.ClassLoader` | `getClassLoader()` What class loader to use for loading classes while compiling this JSP? I don't think this is used right now -- akv.
`java.lang.String` | `getClassPath()` The classpath that is passed off to the Java compiler.
`java.lang.String` | `getContentType()` What's the content type of this JSP? Content type includes content type and encoding.
`java.lang.String` | `getFullClassName()` Utility method to get the full class name from the package and class name.
`java.lang.String` | `getJspFile()` Path of the JSP URI.
`Options` | `getOptions()` Get hold of the Options object for this context.
`java.lang.String` | `getOutputDir()` What is the scratch directory we are generating code into? FIXME: In some places this is called scratchDir and in some other places it is called outputDir.
`JspReader` | `getReader()` Get the input reader for the JSP text.
`java.lang.String` | `getRealPath(java.lang.String path)` Gets the actual path of a URI relative to the context of the compilation.
`java.io.InputStream` | `getResourceAsStream(java.lang.String res)` Gets a resource as a stream, relative to the meanings of this context's implementation.
`java.lang.String` | `getServletClassName()` Just the class name (does not include package name) of the generated class.
`java.lang.String` | `getServletJavaFileName()` Full path name of the Java file into which the servlet is being generated.
`java.lang.String` | `getServletPackageName()` The package name into which the servlet class is generated.
`ServletWriter` | `getWriter()` Where is the servlet being generated?
`boolean` | `isErrorPage()` Are we processing something that has been declared as an errorpage?
`boolean` | `keepGenerated()` Are we keeping generated code around?
`java.lang.String` | `resolveRelativeUri(java.lang.String uri)` Get the full value of a URI relative to this compilations context
`void` | `setContentType(java.lang.String contentType)`
`void` | `setErrorPage(boolean isErrPage)`
`void` | `setReader(JspReader reader)`
`void` | `setServletClassName(java.lang.String servletClassName)`
`void` | `setServletJavaFileName(java.lang.String servletJavaFileName)`
`void` | `setServletPackageName(java.lang.String servletPackageName)`
`void` | `setWriter(ServletWriter writer)`

Method Detail

### getClassPath

    public java.lang.String getClassPath()

  The classpath that is passed off to the Java compiler.

### getReader

    public JspReader getReader()

  Get the input reader for the JSP text.

### getWriter

    public ServletWriter getWriter()

  Where is the servlet being generated?

### getClassLoader

    public java.lang.ClassLoader getClassLoader()

  What class loader to use for loading classes while compiling this JSP? I don't think this is used right now -- akv.

### addJar

    public void addJar(java.lang.String jar)
                throws java.io.IOException

  Add a jar to the classpath used by the loader

  Throws:
    `java.io.IOException`

### isErrorPage

    public boolean isErrorPage()

  Are we processing something that has been declared as an errorpage?

### getOutputDir

    public java.lang.String getOutputDir()

  What is the scratch directory we are generating code into? FIXME: In some places this is called scratchDir and in some other places it is called outputDir.

### getJspFile

    public java.lang.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.

### getServletClassName

    public java.lang.String getServletClassName()

  Just the class name (does not include package name) of the generated class.

### getServletPackageName

    public java.lang.String getServletPackageName()

  The package name into which the servlet class is generated.

### getFullClassName

    public java.lang.String getFullClassName()

  Utility method to get the full class name from the package and class name.

### getServletJavaFileName

    public java.lang.String getServletJavaFileName()

  Full path name of the Java file into which the servlet is being generated.

### keepGenerated

    public boolean keepGenerated()

  Are we keeping generated code around?

### getContentType

    public java.lang.String getContentType()

  What's the content type of this JSP? Content type includes content type and encoding.

### getOptions

    public Options getOptions()

  Get hold of the Options object for this context.

### setContentType

    public void setContentType(java.lang.String contentType)

### setReader

    public void setReader(JspReader reader)

### setWriter

    public void setWriter(ServletWriter writer)

### setServletClassName

    public void setServletClassName(java.lang.String servletClassName)

### setServletPackageName

    public void setServletPackageName(java.lang.String servletPackageName)

### setServletJavaFileName

    public void setServletJavaFileName(java.lang.String servletJavaFileName)

### setErrorPage

    public void setErrorPage(boolean isErrPage)

### createCompiler

    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.

  Throws:
    `JasperException`

### resolveRelativeUri

    public java.lang.String resolveRelativeUri(java.lang.String uri)

  Get the full value of a URI relative to this compilations context

### getResourceAsStream

    public java.io.InputStream getResourceAsStream(java.lang.String res)

  Gets a resource as a stream, relative to the meanings of this context's implementation.

### getRealPath

    public java.lang.String getRealPath(java.lang.String path)

  Gets the actual path of a URI relative to the context of the compilation.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Apache Software Foundation. All Rights Reserved.