JavaBeat

  • Home
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)
  • Privacy

Spring MVC – component-scan Vs annotation-config Vs annotation-driven

April 8, 2015 by Krishna Srinivasan Leave a Comment

If you are a spring developer then you might have a small confusion about the annotation processing inside spring’s IOC container. Spring MVC framework provides different configuration elements that are helping or instructing the Spring container to effectively manage the beans and inject the beans when required. Some of the XML configurations that are most […]

Filed Under: Spring Framework Tagged With: Spring MVC

Spring MVC – Application Context vs Web Application Context

April 7, 2015 by Krishna Srinivasan Leave a Comment

Understanding the difference between ApplicationContext and WebApplicationContext for Spring developers is important. There are various context names available in the spring framework that are used based on the type of application. The most common ambiguity due to the two different context configuration files used for configuring the spring applications. The question comes to developers mind […]

Filed Under: Spring Framework Tagged With: Spring MVC

Spring MVC + jQuery Integration Example

June 19, 2014 by Krishna Srinivasan Leave a Comment

This tutorial demonstrates how to integrate Spring MVC and jQuery for developing a web application. This example uses jQuery front end for getting the data from Spring MVC controller. Also the data is used in the text box for the auto completion feature. If you have any questions, please write it in the comments section. […]

Filed Under: Spring Framework Tagged With: JQuery Integration, Spring Integration, Spring MVC

WebApplicationInitializer in Spring MVC

May 15, 2014 by Krishna Srinivasan Leave a Comment

Spring 3.1 has introduced a new feature for configuring the deployment descriptor using the Java Config approach. We don’t need to write the web.xml file for initializing the web applications. Everything can be done through a Java class itself. The Java class has to implement the org.springframework.web.WebApplicationInitializer which will be loaded when web application starts. […]

Filed Under: Spring Framework Tagged With: Spring MVC

Spring MVC : How To Return Custom 404 Error Pages

May 15, 2014 by Krishna Srinivasan Leave a Comment

This example provides the steps to write your own 404 Resource Not Found error page for your application. Here I am writing a custom exception for 404 error using the HttpStatus.NOT_FOUND. This will be annotated as the exception @ExceptionHandler in the controller. Whenever there is any error thrown on this type, it will be redirected […]

Filed Under: Spring Framework Tagged With: Spring MVC

RequestContextHolder in Spring MVC

May 15, 2014 by Krishna Srinivasan Leave a Comment

RequestContextHolder is a spring API for setting the values to any of three scopes request, session or global session. Note that in some situations, we may not be able to get the actual request from the request, we can simply use RequestContextHolder to get the request attributes and set the values. We have to explicitly […]

Filed Under: Spring Framework Tagged With: Spring MVC

Spring MVC Redirect Example

May 9, 2014 by Krishna Srinivasan Leave a Comment

This tutorial explains how to redirect to a new URL inside the Spring MVC controller. There is attribute “redirect” which can be prefixed to the view name to indicate that the new request should be a redirected one. also read: Spring 4 Tutorials Introduction to Spring MVC Framework 1. Spring MVC Controller SpringMVCController.java 2. Views […]

Filed Under: Spring Framework Tagged With: Spring MVC

DependsOn Attribute in Spring Configuration

May 3, 2014 by Krishna Srinivasan Leave a Comment

This example shows how to use the dependsOn attribute for loading the depended beans referenced by another bean. dependsOn is a attribute as part of the bean tag and it takes the comma separated bean names which are loaded before the actual bean is instantiated. Lets look at the syntax for using the dependsOn attribute. […]

Filed Under: Spring Framework Tagged With: Spring MVC

How To Pass Multiple Parameters To Spring MVC Controller

May 3, 2014 by Krishna Srinivasan Leave a Comment

This example shows how to pass the multiple parameters to the Spring controller. In our previous article, I have explained how to use the @PathVariable to pass the parameters to the controller. This example shows a simple example on how to pass multiple parameters using the @PathVariable. 1. Spring Controller HelloController.java 2. Spring Configuration spring-dispatcher-servlet.xml […]

Filed Under: Spring Framework Tagged With: Spring MVC

Configure Multiple View Resolvers in Spring MVC

October 26, 2013 by Krishna Srinivasan Leave a Comment

In my previous tutorial I have explined about content negotiation startegy introduced in Spring MVC 3.2. This tutorial focuses on how to configure multiple view resolvers for your spring web application. We have different view resolvers for different purposes : XmlViewResolver, ResourceBundleViewResolver, and InternalResourceViewResolver. XmlViewResolver: An implementation of ViewResolver that accepts a configuration file written […]

Filed Under: Spring Framework Tagged With: Spring Framework, Spring MVC

  • 1
  • 2
  • 3
  • 4
  • Next Page »

Follow Us

  • Facebook
  • Pinterest
JavaBeat

FEATURED TUTORIALS

Servlet Life Cycle: Explanation

Servlet Life Cycle: Explanation

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

The Java 6.0 Compiler API

Copyright © by JavaBeat · All rights reserved

This website uses cookies to ensure you get the best experience on our website. Learn more.