Spring Security Tutorial Hello World Example – Using XML Configuration

In this Spring Security Tutorial, we will build a Simple Spring MVC Hello World application integrated with Spring Security features. In this application, we will be dealing with two major security areas Authentication and Authorization.

  • Authentication – It is nothing but validating whether the user is a valid user or not.
  • Authorization –  Deciding whether the particular user is allowed to perform a certain activity in the application or not.

[Read more…]

ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

When you happen to work with a Spring MVC Framework based Web application. Then java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener is a common problem which will be occurring during deployment. Spring MVC throws this exception when it is not able to find the “org.springframework.web.context.ContextLoaderListener” class which loads up the all the Spring MVC configuration files and other configuration files which is declared in the web.xml.

 <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value> 
       /WEB-INF/SpringMVC-servlet.xml, 
       /WEB-INF/SpringSecurity.xml 
    </param-value>
 </context-param>

 <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
 </listener>

This exception will mostly happen when you start the server [Read more…]