Java Code Examples for org.apache.catalina.connector.Connector#setAllowTrace()

The following examples show how to use org.apache.catalina.connector.Connector#setAllowTrace() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TomcatConfig.java    From singleton with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * create the https additional connection for tomcat
 */
private Connector initiateHttpsConnector(ServerProperties serverProperties) {
	Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
	connector.setScheme(ConstantsTomcat.HTTPS);
	connector.setPort(serverProperties.getServerPort());
	connector.setSecure(true);
	Http11NioProtocol protocol = (Http11NioProtocol) connector.getProtocolHandler();
	protocol.setSSLEnabled(true);
	protocol.setKeystoreFile(serverProperties.getHttpsKeyStore());
	protocol.setKeystorePass(serverProperties.getHttpsKeyStorePassword());
	protocol.setKeystoreType(serverProperties.getHttpsKeyStoreType());
	protocol.setKeyPass(serverProperties.getHttpsKeyPassword());
	protocol.setKeyAlias(serverProperties.getHttpsKeyAlias());
	protocol.setMaxHttpHeaderSize(serverProperties.getMaxHttpHeaderSize());
	connector.setRedirectPort(ConstantsTomcat.REDIRECT_PORT);
	connector.setAllowTrace(serverProperties.isAllowTrace());
	return connector;
}
 
Example 2
Source File: TomcatConfig.java    From singleton with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * create the https additional connection for tomcat
 */
private Connector initiateHttpsConnector(ServerProperties serverProperties) {
	Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
	connector.setScheme(ConstantsTomcat.HTTPS);
	connector.setPort(serverProperties.getServerPort());
	connector.setSecure(true);
	Http11NioProtocol protocol = (Http11NioProtocol) connector.getProtocolHandler();
	protocol.setSSLEnabled(true);
	protocol.setKeystoreFile(serverProperties.getHttpsKeyStore());
	protocol.setKeystorePass(serverProperties.getHttpsKeyStorePassword());
	protocol.setKeystoreType(serverProperties.getHttpsKeyStoreType());
	protocol.setKeyPass(serverProperties.getHttpsKeyPassword());
	protocol.setKeyAlias(serverProperties.getHttpsKeyAlias());
	protocol.setMaxHttpHeaderSize(serverProperties.getMaxHttpHeaderSize());
	connector.setRedirectPort(ConstantsTomcat.REDIRECT_PORT);
	connector.setAllowTrace(serverProperties.isAllowTrace());
	return connector;
}
 
Example 3
Source File: Application.java    From binance-marketmaker with The Unlicense 5 votes vote down vote up
@Bean
public EmbeddedServletContainerFactory servletContainer() {
 
    TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory();
 
    Connector ajpConnector = new Connector("AJP/1.3");
    ajpConnector.setPort(9090);
    ajpConnector.setSecure(false);
    ajpConnector.setAllowTrace(false);
    ajpConnector.setScheme("http");
    tomcat.addAdditionalTomcatConnectors(ajpConnector);
 
    return tomcat;
}
 
Example 4
Source File: AjpConfiguration.java    From osiam with MIT License 5 votes vote down vote up
@Override
public void customize(ConfigurableEmbeddedServletContainer container) {
    if (container instanceof TomcatEmbeddedServletContainerFactory) {
        TomcatEmbeddedServletContainerFactory tomcat = (TomcatEmbeddedServletContainerFactory) container;
        Connector ajpConnector = new Connector("AJP/1.3");
        ajpConnector.setAttribute("address", bindAddress);
        ajpConnector.setPort(port);
        ajpConnector.setSecure(false);
        ajpConnector.setAllowTrace(false);
        ajpConnector.setScheme("http");
        tomcat.addAdditionalTomcatConnectors(ajpConnector);
    }
}