heshao2005 发表于 2017-1-22 08:31:17

TOMCAT支持J2EE版本问题

  j2ee1.4 支持的是servlet2.4,jsp2.0,ejb2.1,等等

j2ee5.0 支持的是servlet2.5,jsp2.1,ejb3.0,等等.
  Tomcat5实现了Servlet2.4和JSP2.0,所以在tomcat5下运行的web工程,最好是选择j2ee1.4,如果要选择j2ee5.0,需要手动拷贝j2ee5.0的jar.
  Apache Tomcat version 5.5 implements the Servlet 2.4 and JavaServer Pages 2.0 specifications from the Java Community Process, and includes many additional features that make it a useful platform for developing and deploying web applications and web services.
  Tomcat6实现了Servlet2.5和JSP2.1,所以他支持J2EE5.0,不需要手动拷贝包,由于J2EE规范是向前兼容的,所以他也支持j2ee1.4
  Apache Tomcat version 6.0 implements the Servlet 2.5 and JavaServer Pages 2.1 specifications from the Java Community Process, and includes many additional features that make it a useful platform for developing and deploying web applications and web services.
  project的.setting folder下面,有个名为org.eclipse.wst.common.project.facet.core.xml的文件,里面配置有各种版本信息,如果配置的不对,可能会报
  tomcat x.x does not support version x.x of J2EE specification.....。  
  


<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="jst.java" version="5.0"/>
<installed facet="jst.web" version="2.4"/>
</faceted-project>

 
页: [1]
查看完整版本: TOMCAT支持J2EE版本问题