I'm not talking about
import A;

I'm talking about simply using A in the JSP

<%=A.test()%> without using an import,

This doesn't work, cause our JSP page gets packaged as org.apache.jsp.<directory> and our code adds that before it tries to resolve A

Filip

Yoav Shapira wrote:
Hi,
I think we are intentionally not supporting this, because Java itself
(as of 1.4 IIRC) doesn't support it.  See for example
http://forum.java.sun.com/thread.jspa?threadID=733449&messageID=4217703
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4361575
http://forum.java.sun.com/thread.jspa?threadID=789673

Yoav


On 12/5/06, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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





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

Reply via email to