More on integration testing of Spring’s MVC annotation mapppings for controllers
A while back I posted some thoughts on how to integration test Spring’s MVC annotation mapppings for controllers. Since then I’ve developed my strategy a little further after find a few gaps in my...
View ArticleIncluding a file extension for the Plone News item image
We’ve configured our Plone site so that our news section appears in Google news by regularly submitting a news sitemap to Google. Unfortunately news items that appear in Google don’t have a picture...
View ArticleCopy portlets assigned to one item to another programatically in Plone
The plone sub-site product Lineage migration script from version 0.1 to 0.6 involves migrating objects that use its obsolete Child Folder custom content type to standard Plone folders marked as child...
View ArticleUsing resource registries to merge css and javascript with plone.app.theming...
One great feature of Plone is the resource registries which speed up the performance of your pages by merging, compressing and improving caching of your CSS and JavaScript resources. plone.app.theming...
View ArticleAdobe Fireworks £60 more expensive to download from the UK than the U.S. and...
I’d like to buy Adobe Fireworks via a download from the adobe.com website. Why does this cost me £100 more (or £60 if you add VAT) than if I’m in the U.S. and download it from the very same website....
View ArticleHow to test sending a http HEAD request to Plone / Zope
Update: my original post only worked in Zope 2.10 and below. There’s a Zope bug about this. I’ve updated the post with a work around to fix this. Today I was trying to fix a bug whereby the image on...
View ArticleConnect jconsole and Java VisualVM to remote Tomcat from Windows via a SSH...
Whilst upgrading our Tomcat instance to the 7.0.x series the other day I noticed the JMX remote life cycle listener in the Tomcat listener page of the configuration reference. In the past I’ve found...
View ArticleGeneric Java class with a method that returns an object of the same generic type
I’ve been doing a little development generify some Java classes to make them reusable across a couple of web applications and wanted to share this neat trick I learned along the way. Method that...
View ArticleSending email using SMTP authentication with JavaMail
Update – if you’re using Tomcat and want to use JNDI then follow this post instead Sending email via Mandrill from a Java web server We’ve decided to do a bit of experimentation of using Mandrill to...
View ArticleSending email using smtp authentication with Tomcat JNDI resource
I found this a little tricky to do and not very well documented on the Tomcat manual and so here is a quick how-to based on what I have working. Add a global resource to your server.xml Some key points...
View ArticleInstall Image Magick on Strawberry Perl
I’ve rarely needed to dip into Perl over the last few years and so only recently discovered Stawberry Perl. I’ve been working on a project with Perl 5.8 and discovered you have to pay to install older...
View ArticleConfigure the default HandlerMapping supplied by in Spring 3.2
In the Spring MVC framework XML based configuration the mvc namespace provides a number of handy elements for configuration your web application. If you include the following in your XML configuration...
View ArticleTomcat and Mysql and character encoding
… or the definitive guide to getting Tomcat and Mysql working correctly with character sets I thought I understood all you needed to know for taking user submitted data and storing it correctly in the...
View ArticleHow to restore Chrome’s most visited pages to new tab page after update 29
I opened a new tab this morning on Chrome and had quite a shock. Instead of seeing my most visited pages I got the Google search box. I also saw “Chrome has updated” across the bottom right of the...
View ArticleHow to check Java’s DNS cache policy without accessing internal sun class
Pre JDK6 Java would by default cache successful DNS lookups for ever. In JDK 6 & 7 it caches for 30 seconds by default or forever when running under a security manager. You can override the...
View ArticleFailed to process TLD / java.net.MalformedURLException: null on Tomcat
Just a quick post about this error I was receiving today as the error is very unhelpful and it took me a while to figure out what was wrong. I was trying to define a taglib in my web.xml as follows...
View ArticleParsing money with currency symbol on Moneta (JSR 354 reference implementation)
This took me a little while to work out. Moneta is the reference implementation of JSR 354 javax.money specification. It’s not particularly well documented. Here’s how to parse monetary amounts that...
View Articlecdk codepipeline docker asset publishing codebuild steps accessing codeartifact
Problem: you’re running a multibuild docker build in your cdk asset publishing step and it needs to pull down artifacts from codeartifact. Here how I got this working for a gradle build. codeartifact...
View Articlecdk docker image for local development
Here’s a Dockerfile I’m using for local cdk development. It installs Docker, CDK and the AWS CLI. It supports bundling with cdk synth and npm test. It’s important that your working directory in your...
View Article