This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 48758 - JSTL sample code and JDK1.5
Summary: JSTL sample code and JDK1.5
Status: CLOSED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Martin Grebac
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-09 11:03 UTC by Geertjan Wielenga
Modified: 2006-03-24 10:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geertjan Wielenga 2004-09-09 11:03:43 UTC
Steps to reproduce:

1. Choose File > New Project > Samples > Web and
then the first sample (JSTL Example).

2. Build the sample.

Now the following error message is displayed:

Compiling 22 source files to C:\Documents and
Settings\geertjan\JSTLExample2\build\web\WEB-INF\classes
C:\Documents and
Settings\geertjan\JSTLExample2\src\org\apache\taglibs\standard\examples\startup\Init.java:161:
as of release 1.5, 'enum' is a keyword, and may
not be used as an identifier
(try -source 1.4 or lower to use 'enum' as an
identifier)
   Enumeration enum = numberMap.keys();
C:\Documents and
Settings\geertjan\JSTLExample2\src\org\apache\taglibs\standard\examples\startup\Init.java:164:
as of release 1.5, 'enum' is a keyword, and may
not be used as an identifier
(try -source 1.4 or lower to use 'enum' as an
identifier)
      
sce.getServletContext().setAttribute("enumeration",
enum);
2 errors
C:\Documents and
Settings\geertjan\JSTLExample2\nbproject\build-impl.xml:183:
The following error occurred while executing this
line:
C:\Documents and
Settings\geertjan\JSTLExample2\nbproject\build-impl.xml:91:
Compile failed; see the compiler error output for
details.
BUILD FAILED (total time: 0 seconds)
Comment 1 Petr Jiricka 2004-09-09 11:05:20 UTC
FYI, this issue is fixed in the current JSTL trunk, but the JSTL
release does not contain this fix yet.
Comment 2 _ rkubacki 2004-09-09 12:06:37 UTC
What about project properties -> compile sources -> add. compiler opts
-> 'source=1.4'
Comment 3 Martin Grebac 2004-09-09 12:34:06 UTC
Right, that's exactly the way I wanted to fix this for now in sample
project.
Comment 4 Martin Grebac 2004-09-09 15:44:17 UTC
Actually this doesn't work, as the value is overriden in
build-impl.xml where default.jdk.source property is used. I'll have to
figure out a different fix - I'll probably rename the enum to some
other name.
Comment 5 Martin Grebac 2004-09-09 16:41:14 UTC
Fixed in trunk:
Checking in Init.java;
/cvs/web/examples/jstl/src/org/apache/taglibs/standard/examples/startup/Init.java,v
 <--  Init.java
new revision: 1.2; previous revision: 1.1
done
Comment 6 zikmund 2004-09-10 09:37:40 UTC
Should be fixed in Beta2 as well.
Comment 7 Martin Grebac 2004-09-10 13:00:11 UTC
Additional fix:

Checking in conditionals/FailureLocal.jsp;
/cvs/web/examples/jstl/web/conditionals/FailureLocal.jsp,v  <-- 
FailureLocal.jsp
new revision: 1.2; previous revision: 1.1
done
Processing log script arguments...
More commits to come...
Checking in format/Demo.jsp;
/cvs/web/examples/jstl/web/format/Demo.jsp,v  <--  Demo.jsp
new revision: 1.2; previous revision: 1.1
done
Comment 8 Martin Grebac 2004-09-13 14:38:40 UTC
Fixed in beta2 branch, too:

Checking in web/format/Demo.jsp;
/cvs/web/examples/jstl/web/format/Demo.jsp,v  <--  Demo.jsp
new revision: 1.1.14.1; previous revision: 1.1
done
Processing log script arguments...
More commits to come...
Checking in web/conditionals/FailureLocal.jsp;
/cvs/web/examples/jstl/web/conditionals/FailureLocal.jsp,v  <-- 
FailureLocal.jsp
new revision: 1.1.14.1; previous revision: 1.1
done
Processing log script arguments...
More commits to come...
Checking in src/org/apache/taglibs/standard/examples/startup/Init.java;
/cvs/web/examples/jstl/src/org/apache/taglibs/standard/examples/startup/Init.java,v
 <--  Init.java
new revision: 1.1.14.1; previous revision: 1.1
done
Comment 9 zikmund 2004-09-17 09:27:17 UTC
Verified in build 200409160517 (pre-beta2).