Reputation: 26733
I am writing an upgrade script which would take Tomcat's server.xml
and add an extra attribute to the each Connector
node. This, however, needs to be done only for HTTP connectors but not others (e.g. AJP).
Looking at my Tomcat configuration, the only obvious different thing is the Connector
protocol
(e.g. HTTP/1.1
or AJP/1.3
), but looking at the documentation I can see that there are different default values for the protocol
attribute - for both AJP and HTTP connectors. This must mean that if you omit the protocol
, Tomcat will somehow figure it out, based on the type of the Connector
.
So how do I identify which connectors are HTTP? How does Tomcat do it?
Upvotes: 1
Views: 260
Reputation: 10256
Maybe this article will be of value to you: http://www.datadisk.co.uk/html_docs/java_app/tomcat6/tomcat6_http_connectors.htm
To sum it up for you:
'The Java-based HTTP/1.1 Connector is the default connector configured in Tomcat...'
However, i believe in newer versions of Tomcat (6+), it will try to locate the APR libraries that will ensure better performance and will try to default to the HTTPApr connector:
http://tomcat.apache.org/tomcat-7.0-doc/apr.html
'Once the libraries are properly installed and available to Java (if loading fails, the library path will be displayed), the Tomcat connectors will automatically use APR'
Hope that helps.
Upvotes: 2