Spring spel tutorial

Spring SpEL: The SpEL stands for Spring Expression Language. It is a powerful expression language which supports querying and manipulating an object graph at the bean creation time or run time. It is similar to other expression languages like JSP EL, OGNL, MVEL and JBoss EL etc with some additional features like method invocation and … Read more

Spring MVC tutorial

Learn Spring mvc tutorial for beginners with examples in eclipse online. We explained every topic with appropriate example. We are providing Spring mvc framework tutorials step by step in eclipse for spring mvc framework, spring mvc configuration file, spring mvc hello world, spring mvc multiple controller, spring mvc login, spring mvc form handling, spring mvc … Read more

Spring MVC exception handling tutorial

Let us discuss spring mvc exception handling example in eclipse. Example Explanation: Use http://localhost:8080/SpringMVCExample6/ student url to start the application. A request for respective resource will generate. Request will be handled by DispatcherServlet. It delegates the request to the ExceptionHandlingController controller. The LoginController controller resolve the request with help of RequestMapping annotation, executes the specific … Read more

Spring MVC form handling tutorial

Let us discuss spring mvc form handling example in eclipse. Example Explanation: Use http://localhost:8080/SpringMVCExample5/student url to start the application. A request for respective resource will generate. Request will be handled by DispatcherServlet. It delegates the request to the FormHandlingController controller. The LoginController controller resolve the request with help of RequestMapping annotation, executes the specific functionality … Read more

Spring mvc login tutorial

Let us discuss spring mvc login example in eclipse. Example Explanation: Use http://localhost:8080/SpringMVCExample4/ url to start the application. Enter username “jai” and password “123”. Click on login button. Request will be handled by DispatcherServlet. It delegates the request to the LoginController controller. The LoginController controller resolve the request with help of RequestMapping annotation, executes the … Read more

Spring MVC multiple controller tutorial

Let us discuss spring mvc multiple controller example in eclipse. Example Explanation: Use http://localhost:8080/SpringMVCExample3/ url to start the application. When you click on any link, a request for respective resource will generate. Request will be handled by DispatcherServlet. The DispatcherServlet choose the controller with the help of HandlerMapping. It delegates the request to the specified … Read more

Spring MVC hello world tutorial

Let us discuss spring mvc hello world example in eclipse. Example Explanation: Use http://localhost:8080/SpringMVCExample1/ url to start the application. When you click on “Say Hello” link, a request for sayHello.html will generate. Request will be handled by DispatcherServlet. It delegates the request to the HelloController controller. The HelloController controller resolve the request with help of … Read more

Spring MVC configuration file

web.xml file: The web.xml file contains the entry of DispatcherServlet for handling the requests. Keep the web.xml file in WebContent/WEB-INF directory of your application. Spring framework first initialize the DispatcherServlet and then load the application context from file [servlet-name]-servlet.xml in WebContent/WEB-INF directory. Example: <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">   <servlet> <servlet-name>HelloWorld</servlet-name> … Read more

Spring MVC framework tutorial

Spring mvc framework provides the facility to build flexible and loosely coupled web applications. MVC stands for Model-View-Controller design pattern which separates the business logic, presentation logic and navigation logic. Where: Model: is responsible for encapsulating the application data (POJO). View: is responsible for rendering the model data. Controller: is responsible for receiving the user … Read more

Spring AOP AspectJ Annotation Configuration Example

AspectJ libraries provides the facility to declare aspect, pointcut etc with the help of annotations. Let us discuss the commonly used AspectJ annotations first. Declaring an aspect: The @Aspect annotation is used to declare a class as an aspect. @Aspect public class AspectModule {   }@Aspect public class AspectModule { } Declaring a pointcut: The … Read more