To create a servlet application in Eclipse IDE you will need to follow the following steps.
  1. Goto file -> New -> Dynamic Web Project
  2. steps to create servlet application in eclipse

  3. Give a name to your project and click next
  4. steps to create servlet application in eclipse


    steps to create servlet application in eclipse

  5. Check Generate web.xml Deployment Descriptor and click finish
  6. steps to create servlet application in eclipse

    steps to create servlet application in eclipse

  7. Click on First project, go to Java Resources -> src. Right click on src select -> New -> Servlet
  8. steps to create servlet application in eclipse

  9. Give servlet class name and click next
  10. steps to create servlet application in eclipse

    steps to create servlet application in eclipse

  11. Leave everything else to default and click finish
  12. steps to create servlet application in eclipse

  13. Now your servlet is created, write some code inside it.
  14. steps to create servlet application in eclipse

  15. Add servlet-api.jar file to your project. Click in Libraries, right click on Web App Libraries select Build Path -> Configure Build Path
  16. steps to create servlet application in eclipse

  17. Click on Add External JARs
  18. steps to create servlet application in eclipse

  19. Select servlet-api.jar from Apache Tomcat Directory
  20. steps to create servlet application in eclipse

    steps to create servlet application in eclipse

  21. Start the server and run the application
  22. steps to create servlet application in eclipse

0 comments :

Post a Comment

 
Top