Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 49545 - Change J2EE level
Change J2EE level
Status: RESOLVED FIXED
Product: javaee
Classification: Unclassified
Component: Web Project
4.x
All All
: P3 (vote)
: TBD
Assigned To: Pavel Buzek
issues@javaee
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-24 21:32 UTC by zikmund
Modified: 2011-09-19 23:18 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zikmund 2004-09-24 21:32:02 UTC
There is no simple way how to upgrade/downgrade
J2EE level of WebApp. Simple "Change" button in
project customizer would help in such cases.

Solutions:
 1) create new project (and you lost your settings)
 2) modify project.properties:
    - j2ee.platform
    - javac.classpath

Notice: automatic web.xml modification would be
welcome.
Comment 1 Geertjan Wielenga 2004-09-26 15:23:05 UTC
Documented in trunk.

Please verify that it is correct and let me know if/when there is a
different way of doing this.
Comment 2 Geertjan Wielenga 2004-10-04 12:58:43 UTC
This is the new text in the online help (you can review it there or here):

Upgrading to the J2EE 1.4 Specification

The IDE supports the development of J2EE 1.4 applications, which
mandate the use of the most recent versions of the JSP and Servlet
specifications:

The JavaServer Pages Specification, Version 2.0 available at
The Java Servlet 2.4 Specification available at
 
To use the J2EE 1.4 specification for development:

The list of templates from which you can select in the New File wizard
is restricted by the J2EE version defined for your project. For
example, tag files are not supported by J2EE 1.3 and therefore do not
appear in the list of templates in the New File wizard if J2EE 1.3 is
the specification defined for your project. In addition, you cannot
compile your project against libraries that are not supported by your
project's J2EE specification. Code completion is similarly affected.

1. Exit the IDE. You change the J2EE definitions outside the IDE and
restart the IDE after completing your changes.
2. Go to your project's nbproject folder and open the
project.properties file.
3. Set the j2ee.platform property and the javac.classpath property as
follows:
j2ee.platform=1.4
javac.classpath=${libs.servlet24.classpath}:${libs.jsp20.classpath}
4. Next, open the project.xml file.
5. Replace the content of the <web-module-libraries> tags, as shown in
the following example:
<web-module-libraries>
    <library>
        <file>${libs.servlet23.classpath}</file>
    </library>
</web-module-libraries>
In this example the above tags would be replaced as follows:
<web-module-libraries>
    <library>
	<file>${libs.servlet24.classpath}</file>
    </library>
    <library>
        <file>${libs.jsp20.classpath}</file>
    </library>
</web-module-libraries>
6. Restart the IDE.

To use the J2EE 1.4 specification for deployment:

1. In the Projects window, expand the Web Pages node, and the WEB-INF
node. Double-click on the web.xml node.
2. Replace the DTD specification with the XML schema specification, as
shown in the following example:
<!DOCTYPE web-app
   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd"gt;
<web-app>
In this example the above specification would be replaced with the
following XML schema specification:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
     version="2.4">
3. Select File > Save from the main menu.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo