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

--- Comment #2 from Konstantin Kolinko <knst.koli...@gmail.com> 2009-12-23 
06:01:26 UTC ---
Retrying to reproduce this with
\webapps\examples\jsp\jsp2\el\basic-arithmetic.jsp

If I add the following four lines to the end of the file:
    48112:
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"; %>
    <c:out value="${fn:trim('{world}')}"/>

When running with Security Manager I observe three different behaviors:

A). The proper error report from bug 48112
(..)
org.apache.el.parser.ParseException: Encountered " <ILLEGAL_CHARACTER> "\' ""
at line 1, column 11.
(..)

To reproduce:
1. Clear the working directory
2. Start Tomcat
3. Remove added lines from basic-arithmetic.jsp, so that it becomes valid
4. Browse http://localhost:8080/examples/jsp/jsp2/el/basic-arithmetic.jsp
5. Add the lines to basic-arithmetic.jsp
6. Reload the page in the browser
7. Observe the error

B). AccessControlException

To reproduce:
1. Clear the working directory
2. Start Tomcat
3. Add the lines to basic-arithmetic.jsp
4. Browse http://localhost:8080/examples/jsp/jsp2/el/basic-arithmetic.jsp
5. Observe the error

C). NoClassDefFoundError

To reproduce:
1. Run A) or B)
2. Stop Tomcat and do *not* clear the working directory
3. Start Tomcat
4. Browse http://localhost:8080/examples/jsp/jsp2/el/basic-arithmetic.jsp
5. Observe the error


java.lang.NoClassDefFoundError: Could not initialize class
org.apache.jsp.jsp.jsp2.el.basic_002darithmetic_jsp
    sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    java.lang.reflect.Constructor.newInstance(Unknown Source)
    java.lang.Class.newInstance0(Unknown Source)
    java.lang.Class.newInstance(Unknown Source)
   
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:145)

I observe the following oddity:
1. Run B)
2. In the working folder both java and class file for the page are present:
basic_002darithmetic_jsp.class
basic_002darithmetic_jsp.java

So, how does it produce a class file when java file generation should have
failed with an exception?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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