org.apache.jasper
インタフェース JspCompilationContext

既知の実装クラスの一覧:
CommandLineContext, 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.

作成者:
Anil K. Vijendran, Harish Prabandham, Pierre Delisle

内部クラスの概要
static interface JspCompilationContext.Interface1
           
 
メソッドの概要
 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?
 java.lang.String getClassPath()
          The classpath that is passed off to the Java compiler.
 java.lang.String getContentType()
          The content type of this JSP.
 java.lang.String getJavacOutputDir()
          The scratch directory to generate code into for javac.
 java.lang.String getJspFile()
          Path of the JSP URI.
 Options getOptions()
          Get hold of the Options object for this context.
 java.lang.String getOutputDir()
          The scratch directory to generate code into.
 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.net.URL getResource(java.lang.String res)
           
 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.
 java.lang.String[] getTldLocation(java.lang.String uri)
          Get the 'location' of the TLD associated with a given taglib 'uri'.
 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)
           
 

メソッドの詳細

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.

isErrorPage

public boolean isErrorPage()
Are we processing something that has been declared as an errorpage?

getOutputDir

public java.lang.String getOutputDir()
The scratch directory to generate code into. FIXME: In some places this is called scratchDir and in some other places it is called outputDir.

getJavacOutputDir

public java.lang.String getJavacOutputDir()
The scratch directory to generate code into for javac. 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.

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()
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.

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.
戻り値:
a null if the resource cannot be found or represented as an InputStream.

getResource

public java.net.URL getResource(java.lang.String res)
                         throws java.net.MalformedURLException

getRealPath

public java.lang.String getRealPath(java.lang.String path)
Gets the actual path of a URI relative to the context of the compilation.

getTldLocation

public java.lang.String[] getTldLocation(java.lang.String uri)
                                  throws JasperException
Get the 'location' of the TLD associated with a given taglib 'uri'.
戻り値:
An array of two Strings. The first one is real path to the TLD. If the path to the TLD points to a jar file, then the second string is the name of the entry for the TLD in the jar file. Returns null if the uri is not associated to a tag library 'exposed' in the web application. A tag library is 'exposed' either explicitely in web.xml or implicitely via the uri tag in the TLD of a taglib deployed in a jar file (WEB-INF/lib).


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.