Tomcat is a Web Server that can run Java Web Applications like Java Servlets, Java Server Pages (JSP), Java Expression Language and Java Websocket. Tomcat is a powerful production ready server that is used by many small, medium and big companies. Students studying Java Servlets and JSP technologies want to practice programs and projects on their home laptops, desktops and even their college computers. So they want to install Tomcat Server on Windows 10 and other older Windows operating systems.
Install Tomcat Server On Windows 10, 8 and 7
Always install Tomcat directly on C Drive instead of Program Files or any other inner folders. If you use Tomcat Windows Installer instead of ZIP version, Tomcat background process will be started automatically.
You need to setup JAVA_HOME or JRE_HOME and CATALINA_HOME so that you can do some maintenance operations on the Tomcat server like Starting and Stopping the server. If you change any deployed files, you may need to restart the server.
Follow the Java Environment Setup in Windows Tutorial to setup JAVA variables globally.
Setup JAVA_HOME variable path as C:\Program Files\Java\jdk1.8.0_131 in my case.
Or setup JRE_HOME variable path as C:\Program Files\Java\jre1.8.0_131 in my case.
Setup CATALINA_HOME variable path as C:\Tomcat8 which is my Tomcat installation path.
This is how we did install Tomcat Server on Windows 10, Windows 8 and Windows 7 operating systems.
Start and Stop Tomcat Server on Windows 10, 8 and 7
After successful installation, go to BIN folder directly under Tomcat folder. You will find two batch files with names startup.bat and shutdown.bat. You can create shortcuts of these batch files on the desktop or inside Startup Menu for easily starting and stopping Tomcat server whenever required.
Simply use Command Prompt to start and stop Tomcat server in other way.
Testing Tomcat Installation
Open any web browser like Internet Explorer or Google Chrome. Go to 'http://localhost:8080'. You should see the below page. It means you successfully installed Tomcat Server. You should start the server before opening the webpage.
Configure Users on Tomcat Server
By default, Tomcat does not use User Password. It does not even prompt to configure users and roles.
Go to Tomcat/conf/tomcat-users.xml
Add Usernames, Passwords and Roles required. Without configuring these Usernames, You will be able to access Server Status, Manager App and Host Manager options on the Tomcat Home Page.
<user username="admin" password="admin" roles="manager-gui"/>
<user username="tomcat" password="tomcat" roles="admin-gui"/>
Examples of Servlets and JSP on Tomcat Server
You can find good quality examples of Servlets and JSP on Tomcat Server at http://localhost:8080/examples/.
Yes. It is this easy to install Tomcat Server on Windows 10 and other older windows operating systems.
You can also read our good stuff articles / exams.
|C Arrays, Multidimensional Arrays and Pointers - Online Test 1|
|C Structures and Pointers - Online Test 1|
|C Data Types and Storage Classes Online Test 1|
|C Functions and Pointers - Online Test 1|