Upgrading to the J2EE 1.4 Specification

See Also

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 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. Code completion is similarly affected.

tip Note that the IDE compiles your applications against the J2EE specification supported by your target server. For Tomcat 5.0 and 5.5 and the Sun Java System Application Server, this is the J2EE 1.4 specification.

To use the J2EE 1.4 specification for development:

  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. Replace the j2ee.platform property and the javac.classpath property, as shown in the following example:

    In this example the above properties would be replaced as follows:

  4. 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.
See Also
About JavaServer Pages Technology
About Servlets

Legal Notices