< Prev
Next >



Setting the classpath to program Servlet



Before we learn how to create our first Servlet program, we need to know that much of the support for developing the web applications based on the Java Servlet technology does not come with the core Java, hence, we have to include the path to a file named servlet-api.jar in our classpath, System Variable.

The servlet-api.jar file comes within the lib Folder of Tomcat installation folder. Let us set show you how to set the our System Variable named - classpath.


In order to set classpath we need to open the menu of Environment variables. To do this, we need to type in a windows command sysdm.cpl in the search box of the Windows Operating System(Windows 7 to Windows 10), and press Enter to open the a window of System Properties.







The next window of System properties open up, we need to click on its tab Advanced.






In this tab Advanced, we need to click on the Environment Variables , in order to set the classpath system variable .


Next, we will explain how to set Environment variables.





Setting up the classpath to servlet-api.jar


Please subscribe our social media channels for notifications, we post a new article everyday.

Decodejava Google+ Page Decodejava Facebook Page  DecodeJava Twitter Page

Coming Next
-
C++ and Python

Ad2