Struggling with the <s:action .. /> tag

This was partly my fault but it took me several hours to work out how to use this tag. I found the information on the Struts2 wiki misleading and although it worked a better method is available on the Nabble forums. It was only after I wrote this post that I found out the best way to use this tag. I have updated this post to reflect the improved method.

Read More

Struggling with struts iterator tag and Object[] array

It took me a good 4 hours to work out how to iterate over an Object[] using the Struts2 <s:iterate ... />. I am hoping that either you would have had the same problem or it was because I am drunk and tired! Anyway, this is how to do it.

Read More

Struts2 Spring plugin can be called multiple times at startup

This gave me some trouble as the multiple calls were overriding my calls to set the org.apache.struts2.spring.StrutsSpringObjectFactory setApplicationContext() method. It just happened that my call came in the middle of the two initialisation calls. I should probably dig deeper and find out where the second call comes from but I came up with this solution along the way and have stuck with it for now.

Read More

Adding support for the canonical value of the rel attribute of the link tag in Apache Roller blogging software

I wanted to add the newly supported <link rel="canonical" href="www.example.com/handle/post_title"/> value to my blogs in order to prevent issues with canonicalisation. I had to dig a little to find out how the URL is generated using Apache Roller but this is the code you need.

Read More

How £75 billion of quantitative easing may result in the government bailing out the banks for an additional £960 billion.

With the government going on a reckless course of quantitative easing will this eventually be inflationary? The answer is clearly yes as our government do not have the backbone to reduce the money supply again when the economy improves. Through fractional reserve banking the government will be pumping £2.4 trillion into the economy for lending. If 40% of that credit goes bad then the government may end up bailing out the banks for an additional £960 billion.

That would make the total debt for each working person in the UK of £32,500 on top of the current national debt of £36,500!

Read More

Struts 2.0.11 datetimepicker while using a hyphen as the date separator

I had a problem submitting the Struts 2.0.11 <s:datetimepicker ... /> tag to my action when I used hyphens as the display format separator. Luckily the answer is simply to use / instead.

Read More

Adding an SSL certificate to your java keystore in Linux

I found it difficult to get specific information on how to do this so I have detailed what worked for me. I was doing this in order to get Jasigs Central Authentication Server integrated with Tomcat. The error I was trying to solve was:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Read More

Loading a Spring configuration file programitically

I was using the Java Plugin Framework that helped provide plugin functionality for my web application. The plugins needed to be Spring enabled so they could leverage the web applications code base but as they were only loaded at runtime the applicationContext.xml of the plugin had to be loaded programitically.

Read More