问题
My J2EE project needs to be ran under J2EE 1.4 environment.
I found there is no option on Eclipse to specify which J2EE version to be used by my J2EE project. However the J2EE project could be deployed to internal Application Servers.
May I know if there is anything I am missing?
回答1:
Java EE is a large specification, and not all servers implement it in its entirety. Support for it is then broken down into the various specifications that make it up. Most people are interested in the Servlet version that's supported. This is done using the Dynamic Web Module Facet where the version number matches the desired version of the Java Servlet specification:

Wikipedia page on the Servlet spec, including which versions are in which versions of Java EE
回答2:
I get it you want to test you application on a 1.4 Java-running server? Then I'd do:
- download and install the relevant JDK in your OS;
- configure that JDK inside Eclipse:
- Go to Window -> Preferences -> (on the left) Java -> Installed JREs -> (on the right) click "Add" and go configure the just installed JDK;
- create a new server (from the "Server" tab / pane):
- instead of choosing an existing "Server runtime environment" (I'm referring to the Tomcat dialogs as an example, but the Glassfish ones are pretty similar), create a new runtime environment (by clicking on the "Add" text link on the right) and link this new environment to the above configured 1.4 JDK;
- assign this new environment to the server being created;
- add the project to the new server and run it (as you would usually do).
If you then want to be sure you code is 1.4 compatible, right click on the project inside Eclipse -> Properties -> (on the left) Java Compiler -> here set the java source code version (I never did this manually, but it shouldn't be hard to obtain what you want now).
回答3:
just go to the project right click --> properties --> projet facets the change the virsion of your java
回答4:
right click on project folder -> properties, in Dynamic Web Module on Facets, the web container is who handle the jee version, in this case "Server runtime environment" should be modified to the api Servlet 2.4 (means JEE 1.4 platform)
来源:https://stackoverflow.com/questions/22271482/configure-j2ee-version-on-eclipse