Tomcat Server 9

 
Greenhorn
  1. Apache Tomcat Server 9
  2. Tomcat 9 Windows
  3. Tomcat 9 Server.xml Example
  4. Tomcat 9 Download Windows
  5. Tomcat Server 9 Failed To Start
  6. Install Tomcat 9
posted 9 months ago
  • Optional 'thank-you' note:

In the video within this article, we take a closer look at the SpringBoot Configure DataSource Using JNDI, alongside an example using a Tomcat 9 Server. This is about to show the configuration of Tomcat 9.0 in Eclipse oxygen.please subscribe and like to get more updateshttps://www.youtube.com/user/prasadamu.

Hello!
This is my first post here. I am trying to convert my apache tomcat server from http to https. At the moment, when I browse to the port 8443, it fails and says unable to connect.
Inside below file /etc/tomcat9/server.xml
Please can someone advise?

Error logs are below
Saloon Keeper
posted 9 months ago
  • 1
  • Optional 'thank-you' note:
Your Connector element is ill-formed.
On line 61, you're closing it using a '/>'. But on line 62 you're doing an XML element close using '>'.
Delete line 62.

Loudly announcing something is true and finding out you're wrong makes you feel foolish.
Finding out you're wrong and refusing to admit it makes you LOOK foolish.

Greenhorn
posted 9 months ago
  • Optional 'thank-you' note:

Tim Holloway wrote:Your Connector element is ill-formed.
On line 61, you're closing it using a '/>'. But on line 62 you're doing an XML element close using '>'.
Delete line 62.


Thanks, that did the trick!
I have this issue now.
When I navigate to http://localhost:8443/, I get the below error:
Bad Request
This combination of host and port requires TLS.
Current config is below:

Logs are:

Jul 13 14:17:22 xwiki tomcat9[2066]: Server version name: Apache Tomcat/9.0.16 (Ubuntu)
Jul 13 14:17:22 xwiki tomcat9[2066]: Server built: Sep 11 2019 19:47:51 UTC
Jul 13 14:17:22 xwiki tomcat9[2066]: Server version number: 9.0.16.0
Jul 13 14:17:22 xwiki tomcat9[2066]: OS Name: Linux
Jul 13 14:17:22 xwiki tomcat9[2066]: OS Version: 5.3.0-28-generic
Jul 13 14:17:22 xwiki tomcat9[2066]: Architecture: amd64
Jul 13 14:17:22 xwiki tomcat9[2066]: Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Jul 13 14:17:22 xwiki tomcat9[2066]: JVM Version: 1.8.0_252-8u252-b09-1~18.04-b09
Jul 13 14:17:22 xwiki tomcat9[2066]: JVM Vendor: Private Build
Jul 13 14:17:22 xwiki tomcat9[2066]: CATALINA_BASE: /var/lib/tomcat9
Jul 13 14:17:22 xwiki tomcat9[2066]: CATALINA_HOME: /usr/share/tomcat9
Jul 13 14:17:22 xwiki tomcat9[2066]: Command line argument: -Djava.util.logging.config.file=/var/lib/tomcat9/conf/logging.properties
Jul 13 14:17:22 xwiki tomcat9[2066]: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Jul 13 14:17:22 xwiki tomcat9[2066]: Command line argument: -Djava.awt.headless=true
Jul 13 14:17:22 xwiki tomcat9[2066]: Command line argument: -Xmx1024m
Jul 13 14:17:22 xwiki tomcat9[2066]: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
Jul 13 14:17:22 xwiki tomcat9[2066]: Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
Jul 13 14:17:22 xwiki tomcat9[2066]: Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
Jul 13 14:17:22 xwiki tomcat9[2066]: Command line argument: -Dignore.endorsed.dirs=
Jul 13 14:17:22 xwiki tomcat9[2066]: Command line argument: -Dcatalina.base=/var/lib/tomcat9
Jul 13 14:17:22 xwiki tomcat9[2066]: Command line argument: -Dcatalina.home=/usr/share/tomcat9
Jul 13 14:17:22 xwiki tomcat9[2066]: Command line argument: -Djava.io.tmpdir=/tmp
Jul 13 14:17:22 xwiki tomcat9[2066]: Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.3].
Jul 13 14:17:22 xwiki tomcat9[2066]: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Jul 13 14:17:22 xwiki tomcat9[2066]: APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
Jul 13 14:17:22 xwiki tomcat9[2066]: OpenSSL successfully initialized [OpenSSL 1.1.1 11 Sep 2018]
Jul 13 14:17:22 xwiki tomcat9[2066]: Initializing ProtocolHandler ['https-jsse-nio-8080']
Jul 13 14:17:23 xwiki tomcat9[2066]: Server initialization in [1,870] milliseconds
Jul 13 14:17:23 xwiki tomcat9[2066]: Starting service [Catalina]
Jul 13 14:17:23 xwiki tomcat9[2066]: Starting Servlet engine: [Apache Tomcat/9.0.16 (Ubuntu)]
Jul 13 14:17:23 xwiki tomcat9[2066]: Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml]
Jul 13 14:17:23 xwiki tomcat9[2066]: The path attribute with value [/xwiki] in deployment descriptor [/etc/tomcat9/Catalina/localhost
Jul 13 14:17:27 xwiki tomcat9[2066]: 2020-07-13 14:17:27,967 [main] INFO iPropertiesConfigurationSource - loading xwiki.properties f
Jul 13 14:17:28 xwiki tomcat9[2066]: 2020-07-13 14:17:28,159 [main] INFO o.x.e.i.ServletEnvironment - Using permanent directory
Jul 13 14:17:36 xwiki tomcat9[2066]: 2020-07-13 14:17:36,241 [main] INFO o.x.s.f.i.FilesystemStoreTools - Using filesystem store dir
Jul 13 14:17:36 xwiki tomcat9[2066]: 2020-07-13 14:17:36,294 [main] INFO o.x.s.s.i.EmbeddedSolr - Starting embedded Solr ser
Jul 13 14:17:36 xwiki tomcat9[2066]: 2020-07-13 14:17:36,294 [main] INFO o.x.s.s.i.EmbeddedSolr - Using Solr home directory:
Jul 13 14:17:37 xwiki tomcat9[2066]: 2020-07-13 14:17:37,179 [main] WARN o.e.j.u.s.S.config - Trusting all certificates
Jul 13 14:17:37 xwiki tomcat9[2066]: 2020-07-13 14:17:37,179 [main] WARN o.e.j.u.s.S.config - No Client EndPointIdentifi
Jul 13 14:17:37 xwiki tomcat9[2066]: 2020-07-13 14:17:37,337 [main] WARN o.e.j.u.s.S.config - Trusting all certificates
Jul 13 14:17:37 xwiki tomcat9[2066]: 2020-07-13 14:17:37,338 [main] WARN o.e.j.u.s.S.config - No Client EndPointIdentifi
Jul 13 14:17:37 xwiki tomcat9[2066]: 2020-07-13 14:17:37,374 [main] WARN o.a.s.c.CoreContainer - Not all security plugins c
Jul 13 14:17:40 xwiki tomcat9[2066]: 2020-07-13 14:17:40,651 [main] INFO o.x.s.s.i.EmbeddedSolr - Started embedded Solr serv
Jul 13 14:17:42 xwiki tomcat9[2066]: Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml] has finished in
Jul 13 14:17:42 xwiki tomcat9[2066]: Deploying web application directory [/var/lib/tomcat9/webapps/ROOT]
Jul 13 14:17:43 xwiki tomcat9[2066]: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logge
Jul 13 14:17:43 xwiki tomcat9[2066]: Deployment of web application directory [/var/lib/tomcat9/webapps/ROOT] has finished in [1,067]
Jul 13 14:17:43 xwiki tomcat9[2066]: Starting ProtocolHandler ['https-jsse-nio-8080']
Jul 13 14:17:43 xwiki tomcat9[2066]: Server startup in [20,352] milliseconds


Anyone able to help?
Saloon Keeper
posted 9 months ago
  • Optional 'thank-you' note:
I don't think you need the redirectPort attribute on that Connector. Nothing else jumps out at me, though. Unless there was another error as well.

Loudly announcing something is true and finding out you're wrong makes you feel foolish.
Finding out you're wrong and refusing to admit it makes you LOOK foolish.

Greenhorn
posted 9 months ago
  • Optional 'thank-you' note:

Tim Holloway wrote:I don't think you need the redirectPort attribute on that Connector. Nothing else jumps out at me, though. Unless there was another error as well.


Hey, I removed the redirectPort, but no luck, still the same Anything else?
Rancher
posted 9 months ago
  • Optional 'thank-you' note:
I thought the idea was that you wanted it to be an https server?
So why are you expecting http to work?
Or have I misread the thread?
Marshal
posted 9 months ago
  • Optional 'thank-you' note:

Adam Eyres wrote:When I navigate to http://localhost:8443/, I get the below error:
Bad Request
This combination of host and port requires TLS.


Since port 8443 is listening for HTTP over TLS, shouldn't your request be using the https scheme rather than http?
https://localhost:8443/
Dave: didn't see your response while I was typing mine
Greenhorn
posted 9 months ago

Apache Tomcat Server 9

  • Optional 'thank-you' note:
Thanks both, you're right! I made the mistake and though the prefix was https by default
Saloon Keeper
posted 9 months ago
  • Optional 'thank-you' note:
If you look at the Connector for HTTP, you'll see that its redirect port is 8443. That helps when you want to run an HTTPS server but allow people to address it via HTTP port (8080).
One thing I was going to mention, though. DNS does not lookup port numbers, just IP addresses. So if you ask for 'http://xyz.com' with no explicit port number (xyz.com:8080) , then web clients will attempt to address port 80. And you don't want Tomcat to open ports 80 or 443, since that makes Tomcat a big security risk.
It's OK to give people URLs with port IDs in them for in-house work, but not so much for most public Internet sites. So common practice is to put a reverse proxy server on the public ports and have it route traffic through to Tomcat. This also allows you to use the same server to handle both JEE and non-JEE apps from a single point. Proxying servers such as Apache, Nginx, IIS and so forth don't suffer from Tomcat's security issues on the ports below 4096, also.
The link between the proxy server and Tomcat is managed using a private channel and protocol to Tomcat port 8009.
And the best thing about this is that it's a lot easier to install a security cert on something like Apache than it is messing around with keystore configuration in Tomcat. Your uses go SSL to the proxy server, and then the proxy server goes private protocol (ajp) to Tomcat and it's really fairly simple to set up.

Loudly announcing something is true and finding out you're wrong makes you feel foolish.
Finding out you're wrong and refusing to admit it makes you LOOK foolish.

Tomcat server 9.0.36

Content

Apache Tomcat

The Apache Tomcat® software is an open source implementationof theJakarta Servlet,Jakarta Server Pages,Jakarta Expression Language,Jakarta WebSocket,Jakarta Annotations andJakarta Authenticationspecifications. These specifications are part of theJakarta EE platform.

Tomcat 9 Windows

The Jakarta EE platform is the evolution of the Java EE platform. Tomcat 10and later implement specifications developed as part of Jakarta EE. Tomcat 9 andearlier implement specifications developed as part of Java EE.

The Apache Tomcat software is developed in an open and participatoryenvironment and released under theApache License version 2. TheApache Tomcat project is intended to be a collaboration of the best-of-breeddevelopers from around the world. We invite you to participate in this opendevelopment project. To learn more about getting involved,click here.

Apache Tomcat software powers numerous large-scale, mission-critical webapplications across a diverse range of industries and organizations. Some ofthese users and their stories are listed on thePoweredBywiki page.

Apache Tomcat, Tomcat, Apache, the Apache feather, and the Apache Tomcatproject logo are trademarks of the Apache Software Foundation.

2021-04-26 Tomcat 7.0.109 Released

The Apache Tomcat Project is proud to announce the release of version 7.0.109 ofApache Tomcat. This release implements specifications that are part of the JavaEE 6 platform. This release contains a number of bug fixes and improvementscompared to version 7.0.108.

Full details of these changes, and all the other changes, are available in theTomcat 7 changelog.

Note: Apache Tomcat 7.0.x has reached end of life.Read more...

2021-04-06 Tomcat 10.0.5 Released

The Apache Tomcat Project is proud to announce the release of version 10.0.5of Apache Tomcat. This release implements specifications that are part of theJakarta EE 9 platform.

Applications that run on Tomcat 9 and earlier will not run on Tomcat 10without changes. Java EE based applications designed for Tomcat 9 and earliermay be placed in the $CATALINA_BASE/webapps-javaee directory andTomcat will automatically convert them to Jakarta EE and copy them to thewebapps directory. This conversion is performed using theApache Tomcatmigration tool for Jakarta EE tool which is also available as a separatedownload for off-line use.

The notable changes in this release are:

  • Fix a regression in 10.0.4 that meant that an error during an asynchronous read broke all future asynchronous reads associated with the same request instance.
  • Prevent concurrent calls to ServletInputStream.isReady() corrupting the input buffer.
  • Update the packaged version of Tomcat Native to 1.2.27 to pick up binaries built with OpenSSL 1.1.1k.

Full details of these changes, and all the other changes, are available in theTomcat 10changelog.

2021-04-06 Tomcat 9.0.45 Released

The Apache Tomcat Project is proud to announce the release of version 9.0.45of Apache Tomcat. This release implements specifications that are part of theJava EE 8 platform. The notable changes compared to 9.0.44 include:

  • Fix a regression in 9.0.44 that meant that an error during an asynchronous read broke all future asynchronous reads associated with the same request instance.
  • Prevent concurrent calls to ServletInputStream.isReady() corrupting the input buffer.
  • Update the packaged version of Tomcat Native to 1.2.27 to pick up binaries built with OpenSSL 1.1.1k.

Tomcat 9 Server.xml Example

Full details of these changes, and all the other changes, are available in theTomcat 9changelog.

2020-04-06 Tomcat 8.5.65 Released

The Apache Tomcat Project is proud to announce the release of version 8.5.65of Apache Tomcat. This release implements specifications that are part of theJava EE 7 platform. The notable changes compared to 8.5.64 include:

  • Fix a regression in 8.5.64 that meant that an error during an asynchronous read broke all future asynchronous reads associated with the same request instance.
  • Prevent concurrent calls to ServletInputStream.isReady() corrupting the input buffer.
  • Update the packaged version of Tomcat Native to 1.2.27 to pick up binaries built with OpenSSL 1.1.1k.

Full details of these changes, and all the other changes, are available in theTomcat 8.5changelog.

2021-04-06 Tomcat Native 1.2.28 Released

The Apache Tomcat Project is proud to announce the release of version 1.2.28 ofTomcat Native. The notable changes since 1.2.27 include:

  • Correct a regression in the fix for 65181 that prevented an error message from being displayed if an invalid key file was provided and no OpenSSL Engine was configured.

Download ChangeLog for 1.2.28

2021-02-18 Tomcat Migration Tool for Jakarta EE 0.2.0 Released

The Apache Tomcat Project is proud to announce the release of 0.2.0 of theApache Tomcat Migration Tool for Jakarta EE. This release contains a number ofbug fixes and improvements compared to version 0.1.0.

The notable changes in this release are:

  • Various fixes to the packages that are and are not converted
  • A new option to process zip archives in memory to support zip files that use options that are incompatible with a streaming approach
  • A new option to exclude files from transformation

Full details of these changes, and all the other changes, are available in thechangelog.

Tomcat 9 Download Windows

2020-03-06 Tomcat Connectors 1.2.48 Released

The Apache Tomcat Project is proud to announce the release of version 1.2.48 ofApache Tomcat Connectors.This version fixes a number of bugs found in previous releases.

Download ChangeLog for 1.2.48

2015-03-17 Apache Standard Taglib 1.2.5 Released

The Apache Tomcat Project is proud to announce the release of version 1.2.5 ofthe Standard Taglib. This tag library provides Apache's implementation of the JSTL 1.2 specification.

Version 1.2.5 is a minor bug fix release reverting a change made in 1.2.1 where<c:import> modified the HTTP method during POST operations, and fixing anissues that resulted in an AccessControlException during startup unlesspermission was granted to read the accessExternalEntity property.

Please see the Taglibs section for more details.

Download Changes

2013-11-11 Tomcat Maven Plugin 2.2 Released

The Apache Tomcat team is pleased to announce the release of Tomcat Maven Plugin 2.2.Changelog available here.

The Apache Tomcat Maven Plugin provides goalsto manipulate WAR projects within the Apache Tomcat servlet container.

The binaries are available from Maven repositories. You should specify theversion in your project's plugin configuration:

Tomcat Server 9 Failed To Start

or

Install Tomcat 9

Old news