Generated JSP classes import org.apache.jasper.runtime.*. According to the JSP 
spec the default imports should be java.lang.*, javax.servlet.*, 
javax.servlet.jsp.* and javax.servlet.http.*.

The classes from o.a.j.runtime should be fully qualified, rather than 
imported. As far as I can tell, this is restricted to HttpJspBase and 
JspRuntimeLibrary. 

Index: Constants.java
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/Constants.java,v
retrieving revision 1.7
diff -u -w -r1.7 Constants.java
--- Constants.java	21 Aug 2002 16:21:56 -0000	1.7
+++ Constants.java	6 Sep 2002 04:46:08 -0000
@@ -74,7 +74,7 @@
     /**
      * The base class of the generated servlets. 
      */
-    public static final String JSP_SERVLET_BASE = "HttpJspBase";
+    public static final String JSP_SERVLET_BASE = "org.apache.jasper.runtime.HttpJspBase";
 
     /**
      * _jspService is the name of the method that is called by 
@@ -96,7 +96,6 @@
 	"javax.servlet.*", 
 	"javax.servlet.http.*", 
 	"javax.servlet.jsp.*", 
-	"org.apache.jasper.runtime.*", 
     };
 
     /**
 
Index: compiler/Generator.java
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
retrieving revision 1.91
diff -u -w -r1.91 Generator.java
--- compiler/Generator.java	6 Sep 2002 00:15:32 -0000	1.91
+++ compiler/Generator.java	6 Sep 2002 04:46:10 -0000
@@ -866,7 +866,7 @@
 		prepareParams(n);
 	    }
             
-            out.printin("JspRuntimeLibrary.include(request, response, " +
+            out.printin("org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, " +
                 pageParam );
 	    printParams(n, pageParam, page.isLiteral());
 	    out.println(", out, " + isFlush + ");");
@@ -986,15 +986,15 @@
 		java.lang.reflect.Method meth =
 		    JspRuntimeLibrary.getReadMethod(bean, property);
 		String methodName = meth.getName();
-		out.printil("out.write(JspRuntimeLibrary.toString(" +
+		out.printil("out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString(" +
 			    "(((" + beanName + ")pageContext.findAttribute(" +
 			    "\"" + name + "\"))." + methodName + "())));");
 	    } else {
 		// The object could be a custom action with an associated
 		// VariableInfo entry for this name.
 		// Get the class name and then introspect at runtime.
-		out.printil("out.write(JspRuntimeLibrary.toString" +
-			    "(JspRuntimeLibrary.handleGetProperty" +
+		out.printil("out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString" +
+			    "(org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty" +
 			    "(pageContext.findAttribute(\"" +
 			    name + "\"), \"" + property + "\")));");
             }
@@ -1011,18 +1011,18 @@
 	    n.setBeginJavaLine(out.getJavaLine());
 
 	    if ("*".equals(property)){
-		out.printil("JspRuntimeLibrary.introspect(" +
+		out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.introspect(" +
 			    "pageContext.findAttribute(" +
 			    "\"" + name + "\"), request);");
 	    } else if (value == null) {
 		if (param == null)
 		    param = property;	// default to same as property
-		out.printil("JspRuntimeLibrary.introspecthelper(" +
+		out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(" +
 			    "pageContext.findAttribute(\"" + name + "\"), \"" +
 			    property + "\", request.getParameter(\"" + param +
 			    "\"), " + "request, \"" + param + "\", false);");
 	    } else if (value.isExpression()) {
-		out.printil("JspRuntimeLibrary.handleSetProperty(" + 
+		out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.handleSetProperty(" + 
 			    "pageContext.findAttribute(\""  + name + "\"), \""
 			    + property + "\","); 
 		out.print(attributeValue(value, false, null, "null"));
@@ -1035,7 +1035,7 @@
                 // optimize the case where the bean is exposed with
                 // <jsp:useBean>, much as the code here does for
                 // getProperty.)
-                out.printil("JspRuntimeLibrary.handleSetPropertyExpression(" +
+                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.handleSetPropertyExpression(" +
                     "pageContext.findAttribute(\""  + name + "\"), \""
                     + property + "\", "
                     + quote(value.getValue()) + ", "
@@ -1050,13 +1050,13 @@
                 // that body.
                 String valueVarName = generateNamedAttributeValue(
                     value.getNamedAttributeNode() );
-                out.printil("JspRuntimeLibrary.introspecthelper(" +
+                out.printil("org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(" +
                             "pageContext.findAttribute(\""  + name + "\"), \""
                             + property + "\", "
 			    + valueVarName
 			    + ", null, null, false);");
 	    } else {
-		out.printin("JspRuntimeLibrary.introspecthelper(" +
+		out.printin("org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(" +
 			    "pageContext.findAttribute(\"" + name + "\"), \""
 			    + property + "\", ");
 		out.print(attributeValue(value, false, null, "null"));
@@ -2571,7 +2571,7 @@
 
 	    if (propEditorClass != null) {
 		return "(" + c.getName()
-		    + ")JspRuntimeLibrary.getValueFromBeanInfoPropertyEditor("
+		    + ")org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromBeanInfoPropertyEditor("
 		    + c.getName() + ".class, \"" + attrName + "\", "
 		    + quoted + ", "
 		    + propEditorClass.getName() + ".class)";
@@ -2629,7 +2629,7 @@
 		return "new String(" + quoted + ")";
 	    } else {
 		return "(" + c.getName()
-		    + ")JspRuntimeLibrary.getValueFromPropertyEditorManager("
+		    + ")org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager("
 		    + c.getName() + ".class, \"" + attrName + "\", "
 		    + quoted + ")";
 	    }

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to