edit: Updated property compressableMimeType
to compressibleMimeType
as per comment from pieroxy
I found that you can setup the properties like this:
Tomcat current = new Tomcat();
Connector c = this.current.getConnector();
c.setProperty("compression", "on");
c.setProperty("compressionMinSize", "1024");
c.setProperty("noCompressionUserAgents", "gozilla, traviata");
c.setProperty("compressibleMimeType", "text/html,text/xml, text/css, application/json, application/javascript");
I guess that this also applies for other connector property that you need to set up.