Monthly Archives: February 2011

Groovy performance for file IO

As part of the work I’m doing trying to automate a migration from Struts to Spring MVC, I’ve been writing a Groovy script to process the struts config file. I need to add a couple of lines to the file. … Continue reading

Posted in Groovy | Tagged | Leave a comment

Migrating from Struts to Spring MVC – using Groovy!

To migrate from Struts 1 to Spring MVC, the easiest route is: Add the Spring ContextLoaderPlugin to your struts-config file. This plugin will load your bean definitions file. Update struts-config so that rather than using the default Struts request processor … Continue reading

Posted in Groovy, Spring | Tagged , | Leave a comment

Http coding and testing

A few days ago I blogged about writing a dummy server to use for testing. However, rather than just writing on a socket, the code I’m writing uses http and as it happens, there are some useful libraries you can … Continue reading

Posted in Java | Tagged | Leave a comment

Socket code – answer

Did you spot the bug? The server writes to the socket using: out.write(“From server: ” + nextResponse); The client reads using: while ((fromServer = in.readLine()) != null) { However, the PrintWriter write method doesn’t put a carriage return at the … Continue reading

Posted in Java | Tagged | Leave a comment

Socket code – spot the bug

Recently I’ve been trying to test some code that interacts with a third party over http. I’d like to test as much of the code as possible, not just the code that prepares the data, but also the code that … Continue reading

Posted in Java | Tagged | Leave a comment