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.servlet
Class JasperLoader

    java.lang.Object
      java.lang.ClassLoader
          org.apache.jasper.runtime.JspLoader
              org.apache.jasper.servlet.JasperLoader

Direct Known Subclasses:
  JasperLoader12

public class JasperLoader
extends JspLoader

This is a class loader that loads JSP files as though they were Java classes. It calls the compiler to compile the JSP file into a servlet and then loads the generated class. This code is quite fragile and needs careful treatment/handling/revisiting. I know this doesn't work very well right now for: (a) inner classes (b) does not work at all for tag handlers that have inner classes; but that is likely to change with the new JSP PR2 spec.

Author:
  Anil K. Vijendran, Harish Prabandham

Field Summary

Fields inherited from class org.apache.jasper.runtime.JspLoader
`jars, options, parent`

Constructor Summary
`JasperLoader()`

Method Summary
`protected java.lang.Class` | `defClass(java.lang.String className, byte[] classData)` Just a short hand for defineClass now...
`protected byte[]` | `doLoadClassDataFromFile(java.lang.String fileName)` Load JSP class data from file, method may be called from within a doPriviledged if a SecurityManager is installed.
`protected java.lang.Class` | `findClass(java.lang.String className)`
`java.net.URL` | `getResource(java.lang.String name)`
`java.io.InputStream` | `getResourceAsStream(java.lang.String name)`
`protected java.lang.Class` | `loadClass(java.lang.String name, boolean resolve)`
`protected byte[]` | `loadClassDataFromFile(java.lang.String fileName)` Load JSP class data from file, method may be called from within a doPriviledged if a SecurityManager is installed.
`void` | `setProtectionDomain(java.lang.Object pd)`
`java.lang.String` | `toString()`

Methods inherited from class org.apache.jasper.runtime.JspLoader
`addJar, getClassPath, setOptions, setParentClassLoader`

Methods inherited from class java.lang.ClassLoader
`clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### JasperLoader

    public JasperLoader()

Method Detail

### setProtectionDomain

    public void setProtectionDomain(java.lang.Object pd)

### loadClass

    protected java.lang.Class loadClass(java.lang.String name,
                                        boolean resolve)
                                 throws java.lang.ClassNotFoundException

  Throws:
    `java.lang.ClassNotFoundException`

### getResourceAsStream

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

### getResource

    public java.net.URL getResource(java.lang.String name)

### findClass

    protected java.lang.Class findClass(java.lang.String className)
                                 throws java.lang.ClassNotFoundException

  Throws:
    `java.lang.ClassNotFoundException`

### defClass

    protected java.lang.Class defClass(java.lang.String className,
                                       byte[] classData)

  Just a short hand for defineClass now... I suspect we might need to make this public at some point of time.

### loadClassDataFromFile

    protected byte[] loadClassDataFromFile(java.lang.String fileName)

  Load JSP class data from file, method may be called from within a doPriviledged if a SecurityManager is installed.

### doLoadClassDataFromFile

    protected byte[] doLoadClassDataFromFile(java.lang.String fileName)

  Load JSP class data from file, method may be called from within a doPriviledged if a SecurityManager is installed.

### toString

    public java.lang.String toString()

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.