Using recursion to program in JSP

I needed to render a tree structure in a JSP and wanted to use a recursive solution like this:

<jsp:include page="renderTree.jsp">
<jsp:param name="nodes" value="${node.children}"/>
</jsp:include>

After a while of not getting very far with this and trying to figure out why I was getting stack overflow errors, I figured out that the jsp:param tag was [...]

Address in Use Error using Tomcat on Windows XP

Occasionally you might get an error like this when launching Tomcat:
java.net.BindException: Address already in use: JVM_Bind <null>:8080
This can be caused if you already have Tomcat running as it will hold onto a network port for handling HTTP requests. In the above example the port shown is 8080.
However, this error is sometimes apparent even when Tomcat [...]

Working around a javax.net.ssl.SSLHandshakeException

When trying to download data from an HTTPS connection, you might see the following exception reported:
javax.net.ssl.SSLHandshakeException: renegotiation is not allowed
This rather unhelpful error message can be raised on either the server or the client and indicates that the SSL libraries in Java cannot determine whether the CA that signed the server’s certificate is to be [...]

Specifying a different config file for Log4J

Generally, adding a log4j.properties file to the classpath is all that needed to bootstrap your Log4J runtime. In certain cases though you might want to override this behaviour.
I needed to do this recently and it took me a while to find out how to do it in the Log4J docs, so I though I’d make [...]

Getting a “Netscape security model is no longer supported” error when using IntelliJ

I’ve been working on a JMS application that uses encryption with JNDI authentication and have encountered the following error message when running it:

Netscape security model is no longer supported. Please migrate to the Java 2 security model instead.

It turns out that this is a problem with the JDK’s plugin.jar file and can be fixed quite [...]

Formatting dates in Sybase

It’s easy to format dates using the convert function in Sybase, but it’s less easy to remember the cryptic formatting style codes that go with it. This post lists the formatting styles.

Getting Maven to work from behind a firewall

Maven needs to access the Internet to download a number of things including POM files and dependent JAR files that are not held in your local repository. If you are trying to do this from behind a corportate firewall then you’ll need to configure Maven to work around it or you’ll get a load of [...]

Java 1.4 Debugger Not Working?

There’s a bug that I’d encountered running the debugger in JDK 1.4.2 ages ago that reared it’s head again today. I’ve been working on a system that uses this old JDK and thought I’d note the solution here in case I ever came across it again.
The problem is encountered when the JVM is launched [...]

Resolving Subservsion Tree Conflicts when Merging

When merging changes in a Subversion project, you’ll need to resolve any conflicts between your checked out version and the one that you are about to merge from the server. Commonly, conflicts arise when two or more developers have modified the same file; these can be resolved by accepting either parties changes or by completing [...]

Open Session in View Pattern for Spring and JPA

The Open Session in View Pattern is well publicised in Hibernate circles as the best practice approach to presenting data in the Web tier of an application. In this article I’ll demonstrate how simple it is to configure a Spring application to do the same thing with the Java Persistence API (JPA).