Search in sources :

Example 1 with LegacyCookieProcessor

use of org.apache.tomcat.util.http.LegacyCookieProcessor in project incubator-hugegraph-toolchain by apache.

the class TomcatServletConfig method customize.

@Override
public void customize(TomcatServletWebServerFactory factory) {
    // Use customized server port
    String host = this.config.get(HubbleOptions.SERVER_HOST);
    try {
        factory.setAddress(InetAddress.getByName(host));
    } catch (UnknownHostException e) {
        throw new ExternalException("service.unknown-host", e, host);
    }
    factory.setPort(this.config.get(HubbleOptions.SERVER_PORT));
    factory.addContextCustomizers(context -> {
        context.setCookieProcessor(new LegacyCookieProcessor());
    });
}
Also used : UnknownHostException(java.net.UnknownHostException) ExternalException(com.baidu.hugegraph.exception.ExternalException) LegacyCookieProcessor(org.apache.tomcat.util.http.LegacyCookieProcessor)

Aggregations

ExternalException (com.baidu.hugegraph.exception.ExternalException)1 UnknownHostException (java.net.UnknownHostException)1 LegacyCookieProcessor (org.apache.tomcat.util.http.LegacyCookieProcessor)1