https://issues.apache.org/bugzilla/show_bug.cgi?id=57142

--- Comment #4 from Arthur Fiedler <artfied...@gmail.com> ---
I think it would be fair to say to merge the two statements. JSP spec says as
you stated, "Packages java.lang.*, javax.servlet.*, javax.servlet.jsp.*, and
javax.servlet.http.* are imported implicitly by the JSP container."

Then the EL spec says "For security, the following restrictions are enforced.
... 3. Except for classes with java.lang.* package names, a class has to be
explicitly imported before its static fields or methods can be referenced."

Meaning that "javax.servlet.*, javax.servlet.jsp.* and javax.servlet.http.*"
would NOT be included by default into the EL import handler. Unless
"explicitly" imported using @page import="".

Because at face value when you make a JSP page that you specify <@page
import="org.test.*"... you expect EL to be able to use those objects. After you
call ${MyCarEnum.PONTIAC} you start bashing your head as to why X server is
bugged as <%= MyCarEnum.PONTIAC %> is working, and the current recommendation
is to use EL instead of scriptlets. Not only does this confuse the user on what
to do next and how to get it working (they would need to find this page, and
use Marks work-around or apply to all of jsp) it also confuses IDE makers as to
how to provide auto-complete for EL syntax, the page directive would make the
most sense.

I also would provide this functionality by default until the spec is
clarified(how long will that take), because a user is just going to think this
is a bug and try to work around it with scriptlets most likely. Or if you guys
have the contacts to get an official clarification that would be ideal.

These comments are however just my two cents.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

Reply via email to