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

Fauxjsp: productive JSP development

Important note: This post is not being updated. For up-to-date information refer to the project repository: https://github.com/ggeorgovassilis/fauxjsp/ About JSP In this post I'll present a new open source project I'm currently working on, fauxjsp [1] which re-implements JSP in a way that is more robust and faster for developers. It is intended for development, where … Continue reading Fauxjsp: productive JSP development

Liferay diaries: Help! My validation errors are not showing!

While still battling form submissions in my Liferay/Spring MVC Form controller/Multi-portlet beast, I noticed that the Spring form tags would not display errors. As this post [1] explains, the reason is that the form backing object must be named exactly as the class consituting the backing object, but with the first letter in lowercase. Thus … Continue reading Liferay diaries: Help! My validation errors are not showing!

Missing history update when clicking on links in GWT and HtmlUnit unittests

I'm still pretty enthusiastic about the benefits of templating [1] GWT UIs with HTML as it turns out to be a productive way for altering UIs without going through a tedious compilation and deployment procedure. HtmlUnit 2.9 is a great java browser for integration-testing Ajax applications. It works fine with GWT and we use it … Continue reading Missing history update when clicking on links in GWT and HtmlUnit unittests

Spring @PathVariable mapping incomplete path when dots are included

In all my projects this happens at least once, and I'm surprised over and over again: a controller will not map just anything to @PathVariable by default. Contrary to intuition, the annotation's argument is a regular expression which excludes some characters per default. For instance the url http://localhost:8080/myapp/api/user/testuser@example when mapped to a controller: @RequestMapping(value = … Continue reading Spring @PathVariable mapping incomplete path when dots are included

Speeding up initial page view of Ajax applications with static HTML

Many Ajax applications build the UI programmatically, i.e. think of GWT's UI builder or one of the many convenient jquery widgets which incurs a visible delay between the time of the initial page load and the time the page has finished rendering. The delay can be mitigated by a static "please wait while loading" message … Continue reading Speeding up initial page view of Ajax applications with static HTML

GWT RPC calls with Http GET method

GWT's RPC [1] component comes handy when communicating with java backends - it's like RMI restricted to asynchronous calls, however it escapes any attempts to cache server responses. This post discusses a moderately simple way of making RPC responses cacheable by Http proxies and browsers. I'm not going into the details of the RPC lifecycle … Continue reading GWT RPC calls with Http GET method

Stateless user sessions with encrypted session IDs

When trying to design for stateless services one finds it easy to reduce the information stored in an http session but for one piece: whether the client has authenticated against the server or not. Usually you would implement a proccess for authenticating like this: Client submits credentials (login / password) to the server Server checks … Continue reading Stateless user sessions with encrypted session IDs