使用Eclipse IDE创建第一个Servlet应用程序 (Creating First Servlet Application using Eclipse IDE)
Eclipse IDE is the most popular Java IDE used in the Industry. It is developed by an open source community and can be downloaded for free from Eclipse.org
Eclipse IDE是业界最流行的Java IDE。 它由开源社区开发,可以从Eclipse.org免费下载。
使用Eclipse IDE创建Servlet的步骤 (Steps to create Servlet using Eclipse IDE)
To create a Servlet application in Eclipse IDE you will need to follow the following steps:
要在Eclipse IDE中创建Servlet应用程序,您将需要执行以下步骤:
-
File -> 文件 -> New -> 新建 -> Dynamic Web Project
动态Web项目
-
Next
下一步
-
Generate web.xml Deployment Descriptor and click 生成web.xml部署描述符” ,然后单击“ Finish
完成”。
-
-
First project, go to 第一个项目,转到Java Resources -> Java资源 -> src. Right click on src 。 右键单击src select src选择New -> New- > Servlet
Servlet
-
Next
Next。
-
-
Finish
完成
-
-
servlet-api.jar JAR file to your project. Click on servlet-api.jar JAR文件添加到您的项目中。 单击Libraries, right click on 库 ,右键单击Web App Libraries select Web App库,选择Build Path -> 构建路径 -> Configure Build Path
配置构建路径
-
Add External JARs
添加外部JAR
- This JAR is now added to your project's build path. 现在,此JAR已添加到项目的构建路径中。
-
servlet-api.jar from Apache Tomcat目录中选择Apache Tomcat Directory
servlet-api.jar
-
翻译自: https://www.studytonight.com/servlet/creating-servlet-in-eclipse.php