更新时间:2022-06-26 07:52:24
您需要将Servlet API添加到您的类路径中。在Tomcat 6.0中,这是在Tomcat的 lib
文件夹中的一个名为 servlet-api.jar
的JAR。您可以将该JAR的引用添加到项目的类路径中,也可以将JAR的副本放在Eclipse项目中,并将其添加到该路径中。
You need to add the Servlet API to your classpath. In Tomcat 6.0, this is in a JAR called servlet-api.jar
in Tomcat's lib
folder. You can either add a reference to that JAR to the project's classpath, or put a copy of the JAR in your Eclipse project and add it to the classpath from there.
如果你想将JAR放在Tomcat的 lib
文件夹中:
If you want to leave the JAR in Tomcat's lib
folder:
servlet-api.jar
并选择它。servlet-api.jar
and select it.或者,如果您复制JAR进入您的项目:
Or, if you copy the JAR into your project:
servlet-api.jar
in your project and select it.