Category: tomcat

End-to-end testing Java web applications with an embedded Tomcat

 In this instalment on assembly testing [1] I'll talk about how automated system tests run over my Java web applications. The set-up is rather cheap, not very labour-intensive and can incrementally evolve from a simple assembly test (aka smoke test) to a full-fledged system test. Since this post is rather concrete naming tools and frameworks, … Continue reading End-to-end testing Java web applications with an embedded Tomcat

Tomcat starts slowly in docker container

Just a little reminder to self: when running Tomcat with Java 8 in an Ubuntu Docker container, Tomcat will take a very long time (minutes!) to start with even the simplest web application. The issue is actually documented (not entirely Docker-related). The solution is to modify JAVA_OPTS to use a different random device: JAVA_OPTS=-Djava.security.egd=file:/dev/urandom

Tomcat/Scala: invalid byte tag in constant pool: 110

When deploying a Scala application on Tomcat 7 I got this weird error:invalid byte tag in constant pool: 110from Tomcat's annotation scanning in the scala utils jar. There is this bug report that claims it's fixed, but it seems to still happen wit 7.0.53.Since the application doesn't rely on Tomcat's annotation scanning, here is the … Continue reading Tomcat/Scala: invalid byte tag in constant pool: 110

Tomcat, Spring and memory leaks when undeploying or redeploying an web application

In this post I'll talk about a new kind of memory leak in Spring applications involving transaction management and initializing beans.About memory leaks when undeploying a web applicationWhile developing a web application with Spring and Tomcat I frequently run out of heap space. The web is full of stories about this. There is Aspirin to … Continue reading Tomcat, Spring and memory leaks when undeploying or redeploying an web application

Speeding up development by splitting a webapp into parts

I love tagfiles: they feature a well known syntax (EL from JSP), they allow for reusable UI components, they are well supported by my favourite IDE and, most importantly, modifications are instantly visible because the servlet container does not have to restart.At least in theory, because reality often looks different: after a few edits tomcat … Continue reading Speeding up development by splitting a webapp into parts

HTTP pipelining, Tomcat 7 and Firefox 4

During an optimisation cycle for Bazarooma aimed at further reducing latencies I started experimenting with Firefox' HTTP pipelining [1] feature, which is disabled by default. This can be enabled by typing about:config in the URL bar, locating the network.http.pipelining entry and setting it to true. While Firebug did not report any measurable improvement, it turned … Continue reading HTTP pipelining, Tomcat 7 and Firefox 4