glenn 01/03/21 04:38:03
Modified: jasper/src/share/org/apache/jasper/servlet JspServlet.java
Log:
The classpath needed by javac is now built dynamically by using getURLs
on the Context URLClassLoader and all its parent class loaders except
for the system class loader. This removes the need to pass a context
attribute for the classpath between Tomcat and Jasper.
This also fixed a problem with a bad class path element due to
Jasper not understanding jndi named URL's.
Revision Changes Path
1.15 +4 -21
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java
Index: JspServlet.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- JspServlet.java 2001/02/28 22:05:52 1.14
+++ JspServlet.java 2001/03/21 12:37:55 1.15
@@ -150,27 +150,10 @@
private void loadIfNecessary(HttpServletRequest req, HttpServletResponse res)
throws JasperException, ServletException, FileNotFoundException
{
- // First try context attribute; if that fails then use the
- // classpath init parameter.
-
- // Should I try to concatenate them if both are non-null?
-
- String cp = (String) context.getAttribute(Constants.SERVLET_CLASSPATH);
-
- String accordingto;
-
- if (cp == null || cp.equals("")) {
- accordingto = "according to the init parameter";
- cp = options.getClassPath();
- } else
- accordingto = "according to the Servlet Engine";
-
- Constants.message("jsp.message.cp_is",
- new Object[] {
- accordingto,
- cp == null ? "" : cp
- },
- Logger.INFORMATION);
+ // Get the classpath init parameter
+ String cp = options.getClassPath();
+ if( cp == null )
+ cp = "";
if (loadJSP(jspUri, cp, isErrorPage, req, res)
|| theServlet == null) {