Steps to set the classpath to access Servlets API in Tomcat Web Server


  1. Right click on computer icon & click on properties



  2. Click on "Advanced system settings" hyper link



  3. Click on "Advanced" tab & click on "Environment Variables" button



  4. Click on "New" button under User variables



  5. Type Variable name "classpath" & type Variable value "C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib\servlet-api.jar; & click on "OK" button