Steps for Setting JSP Environment
In this JSP tutorial, you will learn the steps for setting JSP environment in Microsoft Windows, setting the PATH and CLASSPATH, steps for downloading and installing the Tomcat web server.
The Java Server Page or JSP is very affordable as most of the software needed for it is easily available for free or at low cost.
- The Java Developer Kit which is available for free
- The Tomcat web server if used is available for free.
- HTML editor would be needed to purchase.
How to set up the JSP Environment in Microsoft Windows:
There are slight differences between operating systems for the JSP Environment’s set up in Windows but below are the basic steps.
First Step:
The first and foremost step before setting up the JSP environment is to verify the presence of Java Developer Kit or JDK on the programmer’s system. If it is not present, the Java Developer Kit or JDK must be downloaded and installed.
This link provides the JDK download:
or
This link provides the latest Windows Platform version of Java SDK.
Second Step:
After the download, the next step is to run the executable setup, or the exe, and follow the prompted instructions on screen.
Third Step:
Setting the PATH and CLASSPATH:
The third step is to set the PATH and CLASSPATH. In Windows 95 or Windows 98, edit the AUTOEXEC.BAT file. In this file, the user has to add the directory <JDK installation directory>bin to the PATH setting in the autoexec.bat file. The above sets the new PATH. Set the CLASSPATH in a similar manner by adding the path <JDK installation directory>libj2ee.jar to the CLASSPATH setting in the autoexec.bat file. The above steps define new PATH and CLASSPATH settings.
If the system is Windows 2000 or Windows XP, edit the environment variables to set the PATH and CLASSPATH settings. The environment variables are accessed by navigating as follows:
Control Panel -> System -> Environment Variables
Repeat the same procedure to set new PATH and CLASSPATH settings.
Fourth Step:
The machine must be rebooted to enable the new settings.
Fifth Step:
The JSP environments can be download here
Sixth Step:
The next major step is to download and install the Tomcat web server. This is needed if the programmer does not possess a JSP-capable web server installed on their machine. Tomcat, developed by Apache, is a free open source JSP and Servlet engine.
Steps for downloading and installing the Tomcat web server:
(1) http://jakarta.apache.org/ download the latest version of Tomcat.
(2) Unzip the downloaded Tomcat zip files, and any files present in the subdirectories that have been placed in a single directory, if any.
(3) Open the file autoexec.bat file to the entry:
SET TOMCAT_HOME=<directory>
Where the directory mentioned above would be the directory into which the contents of the .zip file were extracted.
If the directory created by the user was exforsys , all the contents of the .zip file were extracted then the user make an entry in autoexec.bat file as follows:
SET TOMCAT_HOME=c:exforsys
The above process is only for Windows 95 or Windows 98. If using Windows 2000 or Windows XP, the environment variable TOMCAT_HOME can be set as the directory in:
c:exforsys
(4) The next step is to change the server. Navigate to exforsysbin as seen in the examples above and type startup.
(5) The system reboots and opens the web browser. The user types in the address box:
http://localhost:8080/
(6) The JSP files written by the user are placed in "webapps" directory, inside the created directory exforsys, using the above example. Using the JSP file, example.jsp, this copies into webapps/ROOT directory. Open the web browser and type in the address box
http://localhost:8080/example.jsp
displays the executed JSP file.