java


Localization for Struts Freemarker users

Because it took me freaking forever to find instructions on how to do this… You do NOT need a message-resource tag in your struts configuration files. Those are outdated instructions for old versions of Struts.You do not need to edit ANY xml at all. Your Action needs to implement Freemarker’s TemplateMethodModel interface You need a package.properties file (the default locale) and a then another one for each other locale / language you want to support (ex.

The best argument for compiled languages

I keep thinking back to a short comment at BarCamp Manchester in the Unit Testing talk. When asked if anyone had written an app with 100% code coverage the guy beside me raised his hand. Now I’ve been advocating for a while now that it’s essentially wasted time to bother testing your getters and setters, and when I mentioned something to this effect he said, “How do you know you haven’t made a typo in a variable name?