Tomcat 5.5.10 has an update JDT compiler from Eclipse 3.1. This understands 
Java 5.
You can also configure that you compile with the sun compiler.

Ronald.

On Mon Aug 08 23:25:27 CEST 2005 Tomcat Users List 
<tomcat-user@jakarta.apache.org> wrote:
Hi All,

Easiest part of this question is simply does tomcat (5.5.7) support
using generic types in JSP files? I searched release notes, FAQ, etc
and found no mention either way. Does some erudite soul have the
answer?

Secondly, if it's supposed to support it, why then would it have
difficulty with the following:

In Part.java (a valid java object, visible from the jsp):
public static ArrayList<Part> listParts() {/* code */}

In TestPart.jsp (specifically line 4):
<% ArrayList<Part> parts = Part.listParts(); %>

Attempting to access TestPart results in:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 4 in the jsp file: /tools/TestPart.jsp
Generated servlet error:
Syntax error on token "<", invalid AssignmentOperator

An error occurred at line: 4 in the jsp file: /tools/TestPart.jsp
Generated servlet error:
Syntax error on token "=", != expected

An error occurred at line: 17 in the jsp file: /tools/TestPart.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)

An error occurred at line: 17 in the jsp file: /tools/TestPart.jsp
Generated servlet error:
Syntax error on token ")", : expected


It's clearly puking on the "<ObjectName>" generic type syntax; so, is
it actually supported?

Cheers,
Patrick

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


Reply via email to