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.
- AWS EC2 Instance Setup with Apache Server
- Setup API for GeeksforGeeks user data using WebScraping and Flask
- Setting up the environment in Java
- ReactJS | Setting up Development Environment
- How to get the value of System Property and Environment Variable in Java?
- Creating Knockout Application along with Setting up Environment in Visual Studio
- JQuery | Set the value of an input text field
- HTML | <input> width Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.