A placeholder for various things that are used throughout 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.
| 48 | * mangling names, versions, dirs, loading resources and dealing with uris. |
| 49 | */ |
| 50 | public class JspCompilationContext { |
| 51 | |
| 52 | private final Log log = LogFactory.getLog(JspCompilationContext.class); // must not be static |
| 53 | |
| 54 | private String className; |
| 55 | private final String jspUri; |
| 56 | private String basePackageName; |
| 57 | private String derivedPackageName; |
| 58 | private String servletJavaFileName; |
| 59 | private String javaPath; |
| 60 | private String classFileName; |
| 61 | private ServletWriter writer; |
| 62 | private final Options options; |
| 63 | private final JspServletWrapper jsw; |
| 64 | private Compiler jspCompiler; |
| 65 | private String classPath; |
| 66 | |
| 67 | private final String baseURI; |
| 68 | private String outputDir; |
| 69 | private final ServletContext context; |
| 70 | private ClassLoader loader; |
| 71 | |
| 72 | private final JspRuntimeContext rctxt; |
| 73 | |
| 74 | private volatile boolean removed = false; |
| 75 | |
| 76 | // volatile so changes are visible when multiple threads request a JSP file |
| 77 | // that has been modified |
| 78 | private volatile URLClassLoader jspLoader; |
| 79 | private URL baseUrl; |
| 80 | private Class<?> servletClass; |
| 81 | |
| 82 | private final boolean isTagFile; |
| 83 | private boolean protoTypeMode; |
| 84 | private TagInfo tagInfo; |
| 85 | private Jar tagJar; |
| 86 | |
| 87 | // jspURI _must_ be relative to the context |
| 88 | /** |
| 89 | * Creates a compilation context for a JSP page. |
| 90 | * |
| 91 | * @param jspUri The URI of the JSP page relative to the context |
| 92 | * @param options The compilation options |
| 93 | * @param context The servlet context |
| 94 | * @param jsw The JSP servlet wrapper |
| 95 | * @param rctxt The JSP runtime context |
| 96 | */ |
| 97 | public JspCompilationContext(String jspUri, Options options, ServletContext context, JspServletWrapper jsw, |
| 98 | JspRuntimeContext rctxt) { |
| 99 | this(jspUri, null, options, context, jsw, rctxt, null, false); |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * Creates a compilation context for a tag file. |
| 104 | * |
| 105 | * @param tagfile The URI of the tag file |
| 106 | * @param tagInfo The tag information |
| 107 | * @param options The compilation options |