tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Beans without packages in JSP files
Date Tue, 05 Dec 2006 19:22:12 GMT
Are we intentionally not supporting this?
Would it be possible to set a flag to allow this?

I could expand the patch, that if the packageName parameter in
findType(char[] typeName, char[][] packageName)
starts with "org.apache.jsp" then it would do the same as below, try to 
resolve it as a single class

any thoughts, any more correct solution?
Filip


Index: java/org/apache/jasper/compiler/JDTCompiler.java
===================================================================
--- java/org/apache/jasper/compiler/JDTCompiler.java    (revision 482723)
+++ java/org/apache/jasper/compiler/JDTCompiler.java    (working copy)
@@ -167,7 +167,13 @@
                         }
                         result += sep;
                         result += new String(typeName);
-                        return findType(result);
+                        NameEnvironmentAnswer ne = findType(result);
+                        if ( ne == null /* && check empty package */ ) {
+                            result = new String(typeName);
+                            ne = findType(result);
+
+                        }
+                        return ne;
                 }

                 private NameEnvironmentAnswer findType(String className) {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message