Environment setup for JSP
The environment setup for JSP mainly consists of 3 steps:
- Setting up the JDK.
- Setting up the webserver (Tomcat).
- Starting tomcat server.
All the steps are discussed in details below:
- Setting up Java Development Kit :
Step 1: This step involves downloading JDK from Download JDK.
Step 2: Setting up the PATH environment variable appropriately. For windows:
right-click on My Computer-> select Properties-> Click on Advanced System setting -> Click on Environment Variables -> Then, update the PATH value5 and press the OK button.
On LINUX system if the SDK is installed in /usr/local/jdk-9.0.4 and you use the C shell, you will put the following into your .cshrc file.
setenv PATH /usr/local/jdk-9.0.4/bin:$PATH setenv JAVA_HOME /usr/local/jdk-9.0.4
- Setting up Web Server: Tomcat
Apache Tomcat is an open source software implementation of the JavaServer Pages and Servlet technologies and can act as a server for testing JSP, and can be integrated with the Apache Web Server.
Here are the steps to set up Tomcat on your machine.
Step 1: Download latest version of Tomcat from here.
Step 2: After downloading, unpack the binary distribution into a suitable location.
Step 3: After unpacking create CATALINA_HOME environment variable pointing to the same locations.
- Start tomcat Server :
Starting on Windows Machine by using following command :
Starting on Linux Machine by using the following command :
After successful installation and successfully setup the paths for the server. We can see the home page of tomcat web server by using http://localhost:8080/ on your browser.
This is the final page that you will see in your browser. If you are not getting the required result then start again from tomcat installation process.
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.