Monthly Archives: February 2011

Spring MVC with Form Validation

Today, we are going to look at an example of Spring MVC with form validation via JSR-303 annotations. We will be using the hibernate validations implementation of JSR-303. The pom.xml will look like. The spring specific dependencies are highlighted. The … Continue reading

Posted in Spring | 2 Comments

Enum reverse lookups

Java Enums are starting to become more prevalent. One problem that I found is that if you have some data and need to get the enum for that, then you have to write something custom. I had always done that … Continue reading

Posted in Java | Leave a comment

I don’t prefer interfaces

I have been anti-interface for a long while. I never worked on a project that received the benefit. Every time I worked on a project that used interfaces, all I got was double maintenance. Any time I changed the Impl, … Continue reading

Posted in Java | Leave a comment

Inheritence and Spring JDBC RowMapper

I am working on a project that accumulates data via a series of web pages. There is basically a table per page and and object per page. This makes it nice and neat 1:1. As I am going through the … Continue reading

Posted in Java, Spring | 1 Comment

Approaches to making a Vignette Portal templating webapp

I have seen 3 different approaches to making a Vignette Portal templating webapp to hold your custom code. Make your files in an area that mirrors a webapp This is deployed by copying the vgn-ext-templating webapp to your web server … Continue reading

Posted in Java, Maven, Spring, vignette | Leave a comment

Maven + Spring + JUnit

In your pom.xml, you will need the artifacts for Spring and JUnit. This file is located in your root directory. You can get this location via the ${basedir} maven expression. Create a class that can be injected by spring. The … Continue reading

Posted in Java, JUnit, Maven, Spring | Leave a comment

SLF4J to the rescue

Logging is needed, but all of the different frameworks makes this a pain. You are trying to research a problem and you have to bounce from log to log to research it. SLF4J has bridge implementations that delegate to SLF4J … Continue reading

Posted in Java, logback, slf4j | Tagged , , , , , , , , | Leave a comment