Monthly Archives: June 2010

Scrollable GWT TabLayoutPanel

When writing a GWT app without using one of the more advanced widget toolkits, one limiting shortcoming is that the TabLayoutPanel does not allow the user to scroll invisible tabs into view when there are too many tabs to all … Continue reading

Posted in Google Web Toolkit, Java | Tagged , , | 5 Comments

Mocking a multipart/form-data HTTP request in a unit test

If you have a servlet that processes HTML Form post data, you might want to simulate such a request in your unit tests. This is easily done with Apache Commons HttpClient using MultipartRequestEntity. This example uses MockHttpServletRequest from Spring, but can … Continue reading

Posted in Java, Spring, Testing | Tagged , , , | 3 Comments

Writing Unit Tests for Servlets

When writing unit tests for simple servlets you’ll need to write a lot boilerplate code for mocking out all these HttpServletRequest/Response/Context/… objects every time, plus it feels like too much of a white box test really. Surely there’s a better … Continue reading

Posted in Google Web Toolkit, Java, Spring | Tagged , , , | Leave a comment