Archive for category Java
1 second guide – enabling gzip compression in Apache Tomcat
Posted by rn in Java, Software Engineering on March 18th, 2010
This is one of those note-to-self posts.
Add the following attributes to the <Connector> in Tomcat’s server.xml to enable gzip compression of responses:
compression="on" compressionMinSize="2048" compressableMimeType="text/html,text/xml,text/csv,text/css,text/javascript"
Done.
Wicket On Google App Engine (GAE) – Deployment Configuration
Posted by rn in Java, Software Engineering on March 7th, 2010
Just a quick tip – generally with Wicket we want to supply our application with a way to choose between “Development” vs. “Deployment” mode automatically, so that we can get stack traces etc. during development and disable development features for deployment. Google App Engine sets a convenient JVM property to enable this -
class MyWicketApplication extends Application {
.....
private boolean isProd =
"Production".equalsIgnoreCase(
System.getProperty("com.google.appengine.runtime.environment"));
@Override
public String getConfigurationType() {
return (isProd ? "DEPLOYMENT" : "DEVELOPMENT");
}
}
Bam – Wickety GAE love!

