Spring MVC Tags
In this section we will learn about the Tag libraries that can be used in spring based application.
Spring MVC framework support many different views with the help of pluggable view. If you are using simple jsp files to generate the UI for your application then use can use JST core, Spring form and Spring tags.
You can add the following lines into your jsp page to use there tags:
<%@taglib uri="http://java.sun.com/jsp/jstl/core"
prefix="c"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"
%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
Spring Form tags:
The spring form tags is used to create the user input forms. Here is the list of spring forms tags:
- checkbox tag
- checkboxes tag
- errors tag
- form tag
- hidden tag
- input tag
- label tag
- option tag
- options tag
- password tag
- radiobutton tag
- radiobuttons tag
- select tag
- textarea tag
Spring spring.tld tags:
The spring.tld tags is used for evaluating errors, setting themes and outputting internationalized messages. These are used while creating the UI for the web applications. Here are the list of spring.tld tags:
- bind tag
- escapeBody tag
- hasBindErrors tag
- htmlEscape tag
- message tag
- nestedPath tag
- theme tag
- transform tag
JSTL Tags:
You can also use the JSTL tags in Spring MVC applications. You can read in detail about the JSTL tags at http://www.roseindia.net/jstl/index.shtml.
In the future sections we will be showing you the examples of these tags.