Blog Archives

Spring MVC Custom Validation Annotations

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

Posted in Spring Tagged with: , , , ,

Spring MVC Form Validation with Annotations Tutorial

This tutorial with full source code will show how to validate a form submission in Spring MVC using JSR-303 annotations. You can grab the code for this tutorial on GitHub if you want to follow along. One of the most

Posted in Spring Tagged with: , , ,

Spring MVC Form Tutorial

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

Posted in Spring Tagged with: , , ,

Simple Spring MVC Web Application using Gradle

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

Posted in Gradle, Spring Tagged with: , , ,

Simple Gradle Web Application

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

Posted in Gradle, Java Tagged with: , , ,

How to Import Gradle Project into Eclipse

Gradle is a great configuration tool, but you obviously need to work inside your IDE too! The Gradle “eclipse” plugin supports easily importing your project into Eclipse. Here is an example: Create a new folder called basic-eclipse. Inside the folder,

Posted in Gradle Tagged with: ,

Basic Java Application Project Using Gradle

Here is how to setup a Gradle build to run a basic Java project through the main method: Create a folder for the project. In this example, we will name the folder basic-java. Create a Java file, called HelloWorld.java, inside

Posted in Gradle Tagged with: ,

How to Install Gradle

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

Posted in Gradle Tagged with: , ,

How to Install Maven

Maven is a popular, if not the most popular, Java build tool and dependency management framework. It is a good idea to use a build tool rather than rely on your IDE build scripts if you are planning on collaborating

Posted in Maven Tagged with: , ,

Spring Java Configuration

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

Posted in Spring Tagged with: , , ,

Sponsored

Follow Me

RSS FeedFollow me on Twitter