In this section, we are going to describe the label tag. The label tag is a UI tag that is used to render an HTML LABEL that allows us to output label:name type of combinations that has the same format treatment as the rest of UI controls.
Add the following code snippet into the struts.xml
file.
struts.xml
| <action name="labelTag"> <result>/pages/uiTags/labelTag.jsp</result> </action> |
Create a jsp using the tag
<s:label>. It renders an HTML
LABEL that allows us to output <s: label name=" " value="
" /> combination that has the same format treatment as the rest of
UI controls.
labelTag.jsp
<%@ taglib prefix="s" uri="/struts-tags" %>
|
Output of the labelTag.jsp:
![]() |
|
Recommend the tutorial |
Ask Questions? Discuss: Label Tag (Form Tag) Example View All Comments
Post your Comment