Spring Security HTTP Basic Authentication Example

33,012 views
By Abhijit Ghosh on Sep 9, 2013 1:36:07 PM

HTTP basic authentication (BA) is a simple authentication mechanism. When a web client requests any secured web resources, server sends an HTTP response with status code 401 (Unauthorized) and WWW-Authenticate HTTP header like WWW-Authenticate: Basic realm="realm here". And browser pops up a login dialog prompting for User name and Password for that realm.

This example shows how to configure HTTP basic authentication using Spring Security framework.

Tags:

Spring Security Custom Login Form Example

77,162 views
By Abhijit Ghosh on Sep 5, 2013 11:23:47 AM

In previous posts Spring Security 3 Hello World Example and Spring Security Logout Example, we have used default login form generated by Spring Security framework. Now we'll set up a custom login form for authentication with username and password.

Tags:

Integrate Free Anti-Bot Service reCAPTCHA with Spring MVC application

15,943 views
By Abhijit Ghosh on Aug 5, 2013 1:12:52 PM

reCAPTCHA is a free CAPTCHA service to protect a site against spam and other types of automated abuse by bots or computer programs. reCAPTCHA provides widget which can easily be integrated to your blog, forum, comment, registration form, contact form, etc and you can be rest assured that only human is posting in your site.

This post will guide you on how to integrate free anti-bot service reCAPTCHA with a Spring MVC application.

Tags:

Spring Security Logout Example

44,199 views
By Abhijit Ghosh on Jul 17, 2013 11:13:01 PM

Spring Security provides Logout Handling Service for logging out by navigating to a particular URL (by default /j_spring_security_logout). LogoutFilter starts processing when a request comes for /j_spring_security_logout url and delegates to LogoutHandler(s) to perform the actual logout functionality like clearing security context, invalidating session, etc. Based on logout configuration, a redirect will be performed to the URL logout-success-url after logout.

In this example, we'll integrate Spring Logout handling mechanism in Spring Security 3 Hello World Example to demonstrate logout functionality.

Tags:

Spring Security 3 Hello World Example

38,393 views
By Abhijit Ghosh on Jul 11, 2013 3:06:46 PM

Security is of great concern in any web application. If you are looking for a proven and industry standard solution to secure your Java/J2ee based application, then widely used and highly customizable authentication and access control framework - Spring Security is well worth considering.

This post will show all the steps to setup, configure and integrate Spring Security 3 to protect your web application from being breached using a simple hello world example.

Tags:

Spring Asm Dependency Issue: java.lang.IncompatibleClassChangeError - Fixed

24,570 views
By Abhijit Ghosh on Jun 10, 2013 2:14:44 PM

If you have migrated / upgraded your project to Spring Framework 3.2 and project builds successfully but when application starts, you are getting IncompatibleClassChangeError, then this post will help you to resolve the same.

Tags:

Spring Mobile Hello World Example that includes DeviceResolver, SitePreference, urlPath SiteSwitcher and LiteDeviceDelegatingViewResolver

45,751 views
By Abhijit Ghosh on Feb 17, 2013 7:56:17 AM

Spring Mobile is an extension to Spring MVC for development of mobile web applications. The Spring Mobile Device module provides a feature (DeviceResolver / LiteDeviceResolver) to detect devices like mobile and tablet in the server side.
Device aware view management is very useful specially when it is required to serve different optimized versions of same website based on request generating device type or specific devices.
Another feature called site preference management allows user to set his / her preference (SitePreference) to view a particular site in either "normal", "mobile" or "tablet" mode from a particular device.
Spring mobile also provides different types of site switchers (like mDot, dotMobi and urlPath SiteSwitcher) which automatically redirect users to the device specific site based on the device generating the request and site preference set by the user.

Tags:

Spring 3 MVC Framework Based Hello World Web Application Example Using Maven, Eclipse IDE And Tomcat Server

67,069 views
By Abhijit Ghosh on Jan 8, 2013 4:16:34 AM

In this post, we'll see how to get started with a Spring Web model-view-controller (MVC) framework based Hello World web application in few steps. Here, we have used m2e-wtp (Maven Integration for Eclipse WTP) to generate a web project, Eclipse IDE to develop the code and Tomcat Server 7 to deploy and run the web application which will print 'Hello World!' in the browser.

Tags:

org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available

21,481 views
By Abhijit Ghosh on Nov 1, 2012 8:15:36 AM

Spring AOP uses either JDK dynamic proxies or CGLIB to create the proxy for a given target object. If the target object to be proxied, does not implement any interfaces then a CGLIB proxy will be created. In this situation if CGLIB is not present in the classpath following exception will be thrown

org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces.

Tags:

Spring 3 Hello World Example / Tutorial using Maven Tool and Eclipse IDE

54,239 views
By Abhijit Ghosh on Sep 2, 2012 3:01:57 PM

This tutorial will help you to write your first Hello World Spring program. We will use Maven tool to generate the project and Eclipse IDE to implement a method which will print 'Hello World!' in the console.

Tags:

About this 'Hello World' site

This site is mainly developed to share coding and technology learning experiences on java / j2ee based technologies.

Simple tutorials / codes have been shared to learn a new technology. Full source code is also available for download.