Home » Author Archives: Steve Hanson

Author Archives: Steve Hanson

Steve is a software developer interested in web development and new technologies. He currently works as a Java consultant at Credera in Dallas, TX.

Spring MVC Custom Validation Annotations

spring-interview-questions-answers

Last tutorial, I showed how to validate a form using annotations. This works great for simple validations, but eventually, you’ll need to validate some custom rules that aren’t available in the out-of-the-box annotations. For example, what if you need to validate that a user is over 21 years old, calculated based off their input birthdate, or, maybe you need to ...

Read More »

Simple Spring MVC Web Application using Gradle

gradle-logo

This post will be similar to our previous post, Simple Gradle Web Application, except we will now use Spring MVC, rather than raw servlets. It is really easy to get a basic Spring MVC application running with Gradle. You can download the source code for this tutorial on Github. Prerequisites Install Gradle Our basic project structure will be:   spring-mvc ...

Read More »

Spring MVC Form Tutorial

spring-interview-questions-answers

This tutorial will show how to handle a form submission in Spring MVC. We will define a controller to handle the page load and the form submission. You can grab the code on GitHub. Prerequisites: You should have a working Spring MVC Application. If you do not already have a working Spring MVC application set up, follow this tutorial. For ...

Read More »

Spring MVC – Easy REST-Based JSON Services with @ResponseBody

json-logo

Spring 3 makes JSON REST services really easy. This tutorial will show you how in just a few steps. You can grab the code on GitHub. Prerequisites You should have a working Spring MVC Application. If you do not already have a working Spring MVC application set up, follow this tutorial. We will define three REST services: 1) to retrieve a random ...

Read More »

Spring Java Configuration

spring-interview-questions-answers

I have found that a lot of Spring developers I know still do not know about or use Spring Java Configuration (aka JavaConfig). Spring 3.0 introduced this feature which allows Spring to be configured entirely in Java – no more XML!! I really enjoy using JavaConfig because, well… it’s Java! This means it has all the benefits of Java type-safety ...

Read More »

Simple Gradle Web Application

gradle-logo

Gradle easily supports Java web applications through the “war” and “jetty” plugins. This tutorial will show you how to quickly make a simple Java Servlet web application.                     Our basic project structure will be: basic-web src main java com codetutr HelloWorldServlet.java webapp WEB-INF web.xml First, create a folder called basic-web, and ...

Read More »

How to Install Gradle

gradle-logo

Gradle is a dependency management / build tool that combines the best of Maven and Ant, making it an extremely powerful and customizable tool. It also uses a sleek Groovy DSL instead of the XML approach of Maven and Ant and is my personal tool-of-choice when I start a new project. Here’s how to install. I’ll write a future post ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.