Home » Enterprise Java » spring » MVC » Page 4

MVC

Spring MVC Radiobutton And Radiobuttons Example

This is a simple example of how to use the radiobutton and radiobuttons tags in Spring MVC. Among the most famous HTML tags is the radio button tag, that renders one or multiple HTML input tags with type radio. The radiobutton and radiobuttons tags are pretty similar to the HTML radio button tag and they are very easy to use, ...

Read More »

Spring MVC Checkbox And Checkboxes Example

This is a simple example of how to create a checkbox and a checkboxes tag in Spring MVC. Among the most famous HTML tags is the checkbox tag, that allows users to check one or more values in a form. Spring MVC checkbox and checkboxes tags are pretty similar to the HTML checkbox tag and they are very easy to ...

Read More »

Spring MVC Textarea Example

This is an example of how to create a form in Spring MVC that contains a textarea field. Spring MVC provides a full library to create forms. Tags provided are very similar in functionality to HTML tags. Among the most important ones is the form:textarea tag. Usually textarea fields are included in forms that contain email messages. So, this example ...

Read More »

Spring MVC Password Example

With this tutorial we shall create and explain a simple way to add password fields in Spring MVC forms. Spring MVC form tag library, provides support for all known HTML tags. Among the most important ones is the form:password tag, that is very useful in submitting forms. This example contains a simple class, which is the MVC model and has ...

Read More »

Spring MVC Textbox Example

This is an example of how to create a form with a textbox in Spring MVC. Spring MVC provides a full form tag library, which is as simple as HTML tags. Spring MVC tags are data binding-aware tags, that allow us to handle form elements, compining JSP and Spring Web MVC. Each tag in Spring MVC provides support for the ...

Read More »

Spring MVC View Resolver Example

In this example we shall talk about Spring MVC View Resolvers. View Resolvers are usually provided by all MVC Frameworks, so that models can be rendered in a browser, without being tied to a specific view technology. Spring MVC Framework provides the ViewResolver interface, that maps view names to actual views. It also provides the View interface, which addresses the ...

Read More »

Spring MVC Exception Handling Example

This is an example of how to handle exceptions in Spring MVC. In Spring MVC Framework exceptions may occur when a controller is invoked. These exceptions may be handled either with the help of SimpleMappingExceptionResolver class, or with the @ExceptionHandler annotation. SimpleMappingExceptionResolver is a HandlerExceptionResolver implementation for mapping exception class names to view names, either for a set of given ...

Read More »

Spring MVC Controller Example

This is an example of Spring MVC Controllers. In Spring MVC, Controllers are used to provide access to the application behavior that is defined through a service interface. Controllers are the ones that interpret user input and transform it into a model that is represented to the user by the view. Here we will create examples, making use of MultiActionController ...

Read More »

Spring MVC Handler Interceptors Example

With this tutorial we shall explain how to make use of Spring MVC handler interceptors. Handler interceptors are provided by Spring’s handler mapping mechanism, and they can be used to apply a certain functionality to requests. For example, an interceptor may be used to check for a principal. In order to create a handler interceptor, we must make use of ...

Read More »

Spring MVC Handler Mapping Example

This is an example of how to handle URL requests mapping in Spring MVC. In particular, we shall check on three handler mapping classes that Spring MVC provides for handling URL requests. They are all used to define a mapping between URL requests and handler objects. We will create a simple project with a Controller, a view (jsp) and we ...

Read More »