Spring MVC Matrix Variables
In this article, we will learn about Spring MVC Matrix Variables. Matrix Variable is used to parse and bind name-value pairs inside a path segment to method parameters. A semicolon separates many pairs. Matrix variables must first be enabled....
read more
Spring MVC context:annotation-config VS context:component-scan
In this article, we will learn about Spring MVC <context:annotation-config> vs <context:component-scan>. Activating all annotations existing in Java beans that have already been registered either by definition in an application context file or by component scanning is the primary function of annotation-config. The requirement for registration is crucial. The component scan assigns the Spring Bean registration to Java classes annotated with @component, @service, @repository, and other attributes. It can do all the functions that annotation config can....
read more
Spring MVC – ResourceBundleViewResolver Configuration
ResourceBundleViewResolver in Spring MVC is used to resolve “view named” by view beans in the “.properties” file. View beans defined in the properties file are utilized by the ResourceBundleViewResolver to determine the view names. Using the Spring Web MVC Framework, the ResourceBundleViewResolver may be utilized as demonstrated in the following example....
read more
Using Enums as Request Parameters in Spring MVC
Enums are a special data type in Java used for representing a fixed set of constants. Controller methods can take enums as parameters, Spring MVC will automatically translate the value of the incoming request parameter to the appropriate enum constant....
read more
Spring MVC – Model Interface
The Spring Web model-view-controller (MVC) is an open-source framework used to build J2EE web applications. It is based on the Model-View-Controller design pattern and implements the basic features of a core spring framework – Dependency Injection. It is designed around a ‘DispatcherServlet’ that dispatches requests to handlers, with configurable handler mappings, view resolution, locale, and theme resolution as well as support for uploading files. In the MVC framework, M stands for Model – used to work with the data, V stands for View – used to work with presenting data to user and C stands for Controller – that contains actual business logic to process the user input....
read more
Spring MVC – Exception Handling
Prerequisites: Spring MVC...
read more
Spring MVC – Multiple View Page
A view page is redirected to another view page in this example. Let’s look at a simple Spring Web MVC framework sample. The procedure is as follows:...
read more
Spring MVC @SessionAttributes Annotation with Example
In the ever-evolving world of web development, a constant challenge is to seamlessly manage data between requests. Enter Spring MVC’s @SessionAttributes annotation, a powerful solution that elegantly manages the session attributes of a Spring application. This markup becomes a lifesaver when certain information must persist throughout the interaction between the user and the web application....
read more
Spring MVC – Multiple Controller
We may construct numerous controllers at once in Spring MVC. Each controller class must be annotated with the @Controller annotation. A Spring MVC example with numerous controllers can be found here. The procedure is as follows:...
read more
Spring MVC – Comparison of Cryptocurrencies using REST API
REST APIS is available in plenty nowadays. As cryptocurrencies are a hot topic nowadays, there is always a need to compare the different cryptocurrencies and get the corresponding value in different currencies. As a sample, let us take a REST API call as...
read more
Spring – MVC Form Checkbox
In this article, we will learn about the Spring MVC Checkbox and Checkboxes tags. We will create a basic Spring MVC project in the Spring tool suite(STS) to create checkboxes using form:checkbox and form:checkboxes tags....
read more
Spring MVC – Number Validation
The Spring Web model-view-controller (MVC) is an open-source framework used to build J2EE web applications. It is based on the Model-View-Controller design pattern and implements the basic features of a core spring framework – Dependency Injection. It is designed around a ‘DispatcherServlet’ that dispatches requests to handlers, with configurable handler mappings, view resolution, locale, and theme resolution as well as support for uploading files. The Spring Framework supports Bean validation using standard validation annotations....
read more