• Post Reply Bookmark Topic Watch Topic
  • New Topic

Compiler error on new type of for loop in 1.5

 
bryan nelson
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I've come across an error on a jsp page that is using the new type of for loop from JDK 1.5.

Here's the code:

<% for (Operation op : Operation.values() ) %>

and here's the error:
[ServletException in:/web/jsp/admin/role/roleModify.jsp] Unable to compile class for JSP An error occurred at line: 102 in the jsp file: /web/jsp/admin/role/roleModify.jsp Generated servlet error: Syntax error on token ":", ; expected An error occurred at line: 102 in the jsp

I have this same type of loop working in actual .java file; why won't it work here?

Do I have to import something into the .jsp so that I can use the new 1.5 syntax?

Any leads would be greatly appreciated!

Thanks,
bryan
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure your app container is using 1.5?
 
bryan nelson
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep. I'm using Tomcat 5.5.9.

And here's the JVM path that it's pointing to:

C:\Java\jre1.5.0_04\bin\client\jvm.dll


I'm confused. Is there some other setting in Tomcat that I could check?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Tomcat forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!