Below are few key changes from Tomcat 7.x to Tomcat 8.x
– Apache Tomcat 8.0.x requires Java 7 or later. Apache Tomcat 7.0.x required Java 6.
– Apache Tomcat 8 supports the Java Servlet 3.1, JavaServer Pages 2.3, Java Unified Expression Language 3.0 and Java WebSocket 1.0 specifications.
– Servlet 3.1 API
– The default HTTP and AJP connector implementation has switched from the Java blocking IO implementation (BIO) to the Java non-blocking IO implementation (NIO)
– The Aliases, VirtualLoader, VirtualDirContext, JAR resources and external repositories features that all provided a way to add resources to a web application have been replaced with a single framework rather than each being implemented separately.
– Tomcat 8 embeds a packaged renamed version of Commons DBCP 2.x. There are a number of notable changes between Commons DBCP 1.x and Commons DBCP 2.x
– When starting Tomcat with the jpda option to enable remote debugging, Tomcat 8 listens on localhost:8000 by default. Earlier versions listened on *:8000.
For more you can check the Tomcat migration document.
Below are the easy steps you can follow to install and run tomcat 8 from downloaded zip file.
- Apache tomcat 8 download from apache download site.
- Extract the Tomcat zip to a desired location on your drive. Here we have used D drive.
Now to run tomcat we need to set the JAVA_HOME .
- Downlaod JRE or JDK according to your requirement from oracle download site.
- We have downloaded latest JRE for 64bit systems i.e: jre-7u60-windows-x64.exe
- Once download completes double click on the exe file name to start the installation.Click Yes on User access control screen
- Select change destination folder incase you don’t want it to install in Program Files. Here we have choosen as D drive for the same so checked the option.
- Click on Install and click on Change to change the destination folder. We have choosen D:\JRE as the folder to install. Click on Next button.
- Wait for the installation completion.
- Uncheck the Restore Security Prompts if you don’t want to do it. Here we have unchecked the same.Click on Next button.
- Click on close to finish the installation
Now JRE is installed but we need to set the JAVA_HOME properly to let tomcat run fine. Please follow below steps to set the JAVA home environment.
- Click on Start > My computer and right click on it to go to Properties option.
- In the properties panel click on the Advanced system settings.
- In the system properties panel click on the Environment Variables.
- In the System Variables section click on New button and add below text for JAVA_HOME.
- Once JAVA_HOME is set click on New button again to add the JAVA CLASSPATH like below.
- Now finally we have set the PATH variable so that it will point to JRE_HOME/bin directory to make the java available in command prompt.
- Search for the PATH variable from the list and click on Edit to edit it.
- Add the %JAVA_HOME%\bin to the start of the variables list like below separated by semi colon”;”.
- Click on OK button to complete the set and click again OK button to complete the Environment variables set.
To test the Java has been set properly open command prompt and execute java –version command and see it shall show output like below.(Make sure you open the command prompt in administrator mode as we are going to use it to run Tomcat in following section)
Now execute the java –version and you shall see an output like below
Now change directory to the tomcat zip file extraction location like below.
Now cd to bin folder and run startup.bat to start the tomcat, it shall popup a new window like below and the “Server Startup in xxxx ms” shall show.
Now to test the tomcat is up or not you can just open any browser and type http://localhost:8080/ and you shall see below screen.
This completes your basic tomcat setup. You can use below links provided by tomcat in the startup screen as shown above for more configuration changes.
For security, access to the manager webapp is restricted. Users are defined in:
In Tomcat 8.0 access to the manager application is split between different users.
Find additional important configuration information in:
Developers may be interested in: