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:
You can also load, execute, and debug web modules that are compliant with the JavaServer Pages Specification, Version 1.2 and the Java Servlet 2.3 Specification. However, to make full use of the J2EE 1.4 features, you should replace the DTD specification with the XML schema specification, as shown in the following example:
Example of a 2.3 DTD specification:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <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">
Note that earlier J2EE versions did not require a servlet or JavaBean class be in a namespace. If you attempt to run a web module that has a servlet or a JavaBean class in the WEB-INF/classes directory, instead of a package subdirectory, you will encounter problems. For example, when compiling a JSP file, the server might report that '.' is expected, or when running a JSP file, the server might report that it cannot resolve a symbol. When generating a servlet, the server might report that it cannot find a class if the class is not in a package.
See Also | |
---|---|
About Web Modules About JavaServer Pages Technology About JSP Syntax |