Category: Netbeans

Spring 4 Web MVC – Hello World using Annotation and Java configuration with Netbeans

Spring 4 Web MVC – Hello World using Annotation and Java configuration with Netbeans

This blog will go through the steps required to setup a basic Spring 4 MVC web application using Netbeans and Maven. The Spring 4 project will be configured using annotations and plain Java rather than XML. It is a step by step guide to getting up and running quickly. There […]

Java Hibernate ManyToMany Tutorial – With Add and Delete examples

Java Hibernate ManyToMany Tutorial – With Add and Delete examples

The many-to-many mappings and usage thereof can be a little bit weird on first glance. This tutorial demonstrates: The mappings (Annotations not XML). Adding an entity to a group. Removing an entity from a group. Listing parents with children. Listing children with parents. (The Hibernate Logic is completely separate from […]

Spring 3 MVC – Adding Objects to a List element on the fly at form submit – (Generic method)

Spring 3 MVC – Adding Objects to a List element on the fly at form submit – (Generic method)

Edit 10-Feb-2015 A much better approach to this problem is simply to use JSON. A number of comments below are in regard to nested lists. The solution detailed here does not readily facilitate nested lists. The solution outlined in this blog does: http://outbottle.com/spring-4-web-mvc-json-handling/. JSON is the recommended way of achieving “Adding […]

Spring 3 Security – Custom Login Form with Remember Me

Spring 3 Security – Custom Login Form with Remember Me

This tutorial will demonstrate the following: Login with a custom login form (rather than the spring security default) Implement a remember me function Distinguish between being logged in via ‘Remember-Me’ versus Actually logged in

Hello Spring 3 Security with Netbeans – Role Based Method Protection

Hello Spring 3 Security with Netbeans – Role Based Method Protection

This tutorial will outline in simple steps how to do the following: Create Spring 3 Web MVC project using Netbeans Introduce Spring Security measures Limit @Controller method invocation to certain User-Role’s using Annotations Roles and users are defined within XML configurations. The full source code is available for download here

Custom Annotated Validation with Spring 3 Web MVC

Custom Annotated Validation with Spring 3 Web MVC

My previous tutorial detailed using Hibernate Validation within Spring 3 Web MVC.  This tutorial shows how to create custom validation annotations. E.g.

This example annotation only permits the word ‘John’. Optionally, it can be case-sensitive. 

Spring 3 Web MVC – Exception Handling – incorporating AJAX

Spring 3 Web MVC – Exception Handling – incorporating AJAX

This tutorial demonstrates how to handle exceptions in Spring 3 Web MCV. Emphasis is given to Handling  exceptions that occur during AJAX requests. I.e. in the event of an exception during an AJAX request,  it is not desirable to redirect to an error page, instead JavaScript error handling code should be […]

Validation for Hibernate in Spring 3 Web MVC (with Netbeans)

Validation for Hibernate in Spring 3 Web MVC (with Netbeans)

This blog details how to apply Validation to Spring 3 Web MVC forms using Hibernate’s validation framework.

Integrating Hibernate with Spring 3 Web MVC

Integrating Hibernate with Spring 3 Web MVC

This tutorial on “Integrating Hibernate with Spring 3 Web MVC” incorporates: Hibernate Transaction Control @RequestMapping friendly URL’s. More on this specific Spring 3 Web MVC friendly URL topic here. (Alternative @RequestParam method here) A Generic DAO suitable for Hibernate operations with Spring 3 Web MVC. More here in this separate […]

A Generic DAO for Hibernate

A Generic DAO for Hibernate

This short blog shares one Generic DAO (Data Access Object) for Hibernate that may be useful in a Spring 3 project. The source code is available for download at the bottom of this page.

Annotated Dependency Injection / Inversion of Control (DI / IoC) in Spring 3 Web MVC using Netbeans

Annotated Dependency Injection / Inversion of Control (DI / IoC) in Spring 3 Web MVC using Netbeans

This tutorial will detail how to insert services and components (Dependency Injection) into a Spring 3 Web MVC Netbeans application. The process used is Dependency Injection (DI) or Inverse of Control (IoC) whereby Spring will instantiate (or inject) certain components at runtime rather than at having them initiated at compile […]

Spring 3 Web MVC – Friendly URL using RequestMapping variable URI

Spring 3 Web MVC – Friendly URL using RequestMapping variable URI

Following on from a previous tutorial on getting a hello world Spring 3 Web MVC application running in Netbeans here, this tutorial will explain how to achieve friendly URL’s incorporating variables. E.g. http://localhost:8084/HelloSpring/person?name=John becomes http://localhost:8084/HelloSpring/person/John

Hello Spring 3 Web MVC using Netbeans

Hello Spring 3 Web MVC using Netbeans

6-Nov-2014 –> Please note that a new blog now exists for Spring 4 Web MVC using Maven and Netbeans with Java configuration (no XML at all) here – John This tutorial will simply detail one correct way to create a simple Spring 3 web application using Netbeans. Note: The Spring plugin […]