A new fish in the pond

June 3, 2011

UTF-8 encoding and Spring message sources

June 23, 2010

This post http://www.cakesolutions.net/teamblogs/2009/04/02/utf-8-encoding-and-message-sources/ explains how you can get Spring to load message resource bundles for UTF-8 encoded characters. Always save you messages file as UTF-8. In Eclipse you can do that by going to the file properties and selecting UTF-8 in the text file encoding section.

@ Google London

June 15, 2010

I went to Google London offices for an AdSense event with my colleague Kathryn. Some more about this great experience at Travelfusion’s blog!

We are live

March 24, 2010

After 3 month of hard work here we’ve launched www.travelfusion.com with an entire new look.

Built with GWT 2.0 a clean and slick interface and easy to use. Got to love it! :D

Handler Interceptors For Annotation Based Configuration in Spring

September 28, 2009

Here’s what you need to have in your *-servlet.xml file:

<context:annotation-config />
<context:component-scan base-package="com.travelfusion.tfweb.guide.controller" />

<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
   <property name="interceptors">
      <ref bean="myInterceptor" />
   </property>
</bean>

<bean id="myInterceptor" class="com.company.MyInterceptor">
  <property name="openingTime"><value>9</value></property>
  <property name="closingTime"><value>18</value></property>
</bean>

And your interceptor class something like:

public class MyInterceptor implements HandlerInterceptor {
   private int openingTime;
   private int closingTime;

   @Override
   public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3) throws    Exception {
      // TODO Auto-generated method stub
   }

   @Override
   public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3) throws    Exception {
      // TODO Auto-generated method stub
   }

   @Override
   public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object arg2) throws Exception {
        Calendar cal = Calendar.getInstance();
        int hour = cal.get(HOUR_OF_DAY);
        if (openingTime <= hour < closingTime) {
           return true;
        } else {
           response.sendRedirect("http://host.com/outsideOfficeHours.html");
           return false;
        }
   }
}

Fixing Eclipse Tomcat Timeout

September 28, 2009

To fix “Server Tomcat v6.0.18 was unable to start within 10 seconds. If the server requires more time, try increasing the timeout in the server editor” double click you server in the Servers perspective and increase the timeout value to complete server operations like in the image below.

Picture 3

It’s been so long, again!

September 22, 2009

It’s quiet crazy how time goes so fast! I haven’t had any time to make posts here, but I hope to write some more in the near future, and if not here at least on Travelfusion’s blog (I’ll post the link here when we go live). I’ve been working for Travelfusion since July and it’s been a great experience! If you want to find cheap flights you should check our website. I am currently the lead developer for the site and we have a planned a major redesign, so there are so many cool things to implement using GWT. Drop by anytime and give us some feedback.

I am loving London, so much to do, never bored – well almost never – and visiting friends and family once a month just makes up for the occasionally lonely days.

Here are some pictures of a team building event. I can’t say for sure that shooting each other is team building but it was a lot of fun.

CIMG2141

7425_1037848722631_1717903954_93695_4269726_n

Handsome bunch

May 23, 2009

IMG_7162

I had to post this one. Guys, sorry if you don’t like to be online, but you’re all very good looking, so it shouldn’t be a problem. :)

@Farewell dinner November 2008, Amsterdam

Ending up at a museum

May 22, 2009

Not everything is wasted time…3 years ago me and Bas worked on a “mashup” of Google maps, when that was a very HOT subject and Ajax apps where appearing on every corner of the web. The project was closed and our domain name taken but the good news is that we managed to stay in the museum of modern betas for eternity. Plus we learned a lot from that experience and now I am trying to get Bas to put it live on his domain so we can remember from time to time how much fun we had doing it.

River Tejo, the sunset and new challenges

April 2, 2009

It’s been a while. I have moved back to Portugal after 4.5 years in Holland. It was a journey, a good one. Now I start a new one with very different weather conditions. :) I travel by ferry daily and in the evening the sunset + the warm breeze alongside the river Tejo feels just great.

I am working as an IT Consultant now and it’s very different but also interesting. On my free time I work on my next big thing. My project should go live somewhere this year (I hope), and if it does I will post about it.

For now I won’t be writing much about programming or Java because I don’t really have time and my work is more directed at business analysis these days. I miss working with the latest technologies, but what I am doing now is also interesting and I still get to taste a bit of coding at home.


Follow

Get every new post delivered to your Inbox.