| Summary: | JSP broken on Java 1.5 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Eirik Bjørsnøs <eirbjo> | ||||
| Component: | server | Assignee: | Jan Bartel <janb> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | janb, jetty-inbox, weijx2003 | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 7.5.x | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Eirik Bjørsnøs
Newer JSP implementations from Glassfish seems to exclude JDTJavaCompiler from compilation, see: https://svn.java.net/svn/jsp~svn/tags/jsp-2.1.3-b10/impl/pom.xml Stealing the following content from org.mortbay.jetty:jsp-2.1-glassfish:2.1.v20100127: org/apache/jasper/compiler/JDTJavaCompiler*.class com/sun/org/apache/commons/logging/** plus adding JDT to the classpath, I was able to compile JSP again on Java 5. Jetty 7 could add the classes above or a solution could be to talk to the Glassfish people and hear if they would consider re-enabling Java 5 support upstream. Eirik, If you put the Ant jar into $JETTY_HOME/lib/jsp jar, did it use that compiler? Jan Actually, don't bother to respond, I just discovered that the jar does not contain any of the other compiler wrappers, other than the in-jvm compiler wrapper. Sigh. Jan (In reply to comment #2) > Eirik, > > If you put the Ant jar into $JETTY_HOME/lib/jsp jar, did it use that compiler? > > Jan I encountered the same problem! Waiting for this problem being fixed! Fixed for 7.5.2. Eirik, If you want to checkout and build head of jetty @ eclipse and also jetty @ codehaus, you should be able to try out the jetty-maven-plugin 7.5.2-SNAPSHOT and verify that if you use jdk1.5 then the jdt compiler will be used. Let me know if there are any problems. cheers Jan (In reply to comment #3) > Sigh. "Sigh." is a compact and precise description of the situation! (In reply to comment #5) > If you want to checkout and build head of jetty @ eclipse and also jetty @ > codehaus, you should be able to try out the jetty-maven-plugin 7.5.2-SNAPSHOT > and verify that if you use jdk1.5 then the jdt compiler will be used. Let me > know if there are any problems. Jan, I don't have Java 5 on my dev box right now, but I faked Jasper to use the JDTJavaCompiler and that seems to work. The Jetty aggregate modules don't build though. They recompile JDTJavaCompiler from unpacked sources, so they need to have jsp-impl and ecj on their compile class paths. I've added them in jetty-aggregate/jetty-all, jetty-aggregate/jetty-all-server and jetty-aggregate/jetty-webapp which seems to fix that issue. I'll attach a patch for that. Created attachment 204024 [details]
Patch adds jsp-impl and ecj to aggregate modules which recompile JDTJavaCompiler
Patch adds jsp-impl and ecj to aggregate modules which recompile JDTJavaCompiler
(In reply to comment #0) Jan, This might have deserved a separate isssue, but I'm lazy today: org.eclipse.jetty:jetty-jsp-2.1:7.5.2-SNAPSHOT doesn't really work very smooth for embedded use. Issue #1: org.glassfish.web:jsp-impl is in provided scope, hence I need to add it to my <dependencies> in my consuming project. Issue #2: Additionally, org.glassfish.web:jsp-impl pulls in a version of the JSP API jar that doesn't include the DTDs for TLDs, hence parsing of taglibs fails. So I need to specify javax.servlet.jsp:jsp-api:2.1 as well to override jsp-impl's version. So my complete Jetty dependency list for use with JSP in a unit test ends up being: <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-webapp</artifactId> <version>7.5.2-SNAPSHOT</version> <scope>test</scope> </dependency> <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-jsp-2.1</artifactId> <version>7.5.2-SNAPSHOT</version> <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish.web</groupId> <artifactId>jsp-impl</artifactId> <version>2.1.3-b10</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.1</version> <scope>test</scope> </dependency> which is rather long and needs to be checked/updated between Jetty versions. The last two of these could be fixed by making jsp-impl non-provided and by explicitly choosing the 2.1 version of the JSP API. (Which is what jetty-distribution ends up using anyhow..) As a side effect, this would make jsp-impl a transitive dependency inside Jetty as well, so adding it to the aggregate modules would no longer be needed. (In reply to comment #8) > (In reply to comment #0) > > Jan, > > This might have deserved a separate isssue, but I'm lazy today: This really did deserve its own issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=358934 Re-opening to deal with the aggregate modules. <eye-roll><long-sigh/></eye-roll> Jan Fixed the jetty-aggregates to remove build error caused by addition of JDTJavaCompiler. |