To create a servlet application in Eclipse IDE you will need to follow the following steps.
- Goto file -> New -> Dynamic Web Project
- Give a name to your project and click next
- Check Generate web.xml Deployment Descriptor and click finish
- Click on First project, go to Java Resources -> src. Right click on src select -> New -> Servlet
- Give servlet class name and click next
- Leave everything else to default and click finish
- Now your servlet is created, write some code inside it.
- Add servlet-api.jar file to your project. Click in Libraries, right click on Web App Libraries select Build Path -> Configure Build Path
- Click on Add External JARs
- Select servlet-api.jar from Apache Tomcat Directory
- Start the server and run the application
0 comments :
Post a Comment