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
Tag: web applications
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
When IE does not load images
Recently the need for a custom photo gallery surfaced in one of my GWT pet projects. While such an endeavour seems endless from an artistic point of view, the mechanics behind it - at least for my humble needs - were rather simple: the gallery widget will be given a list of image IDs for … Continue reading When IE does not load images
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