

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Explore the various struts html tags and learn how to use them for easy creation of user interfaces in jsp development. Tags such as <html:message>, <html:password>, <html:text>, <html:submit>, <html:reset>, <html:errors>, <html:file>, <html:checkbox>, <html:hidden>, <html:radio>, <html:select>, <html:textarea>, <html:form>, <html:base>, and <html:html>. Use this document as a reference for implementing these tags in your struts projects.
Typology: Lecture notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Struts provides HTML tag library for easy creation of user interfaces. In this lesson I will show you what all Struts HTML Tags are available to the JSP for the development of user interfaces.
To use the Struts HTML Tags we have to include the following line in our JSP file:
<%@ taglib uri="/tags/struts-html" prefix="html" %>
above code makes available the tag to the jsp.
Looks up the message corresponding to the given key in the message resources and displays it.
Tag creates the password field. The string is stored in the property named prop in the form bean.
Tag creates the text field. The string is retrieved from and later stored in the property named text1 in the form bean.
Submit
Tag creates a submit button with the provided content as the button text.
Reset
Tag creates a reset button with the provided content as the button text.
Tag prints all the available error on the page.
Tag creates the file upload element on the form. The property must be of the type org.apache.struts.upload.FormFile.
Tag creates check box on the form.
Tag creates the hidden html element on the form.
Tag creates the check box on the form.
Tag creates list box on the form. The property selectBox must be an array of supported data- types, and the user may select several entries. Use to specify the entries.
Tag creates the text area on the form.
action="/Address" method="post">
the data on the server.
**** (^) Tag generates the base tag. tells the browser to pretend that the current page is located at some URL other than where the browser found it. Any relative reference will be calculated from the URL given by instead of the actual URL. goes in the section.
Tag renders an HTML Element.
In the Address.jsp we have used some of the above tags. In the future sections I will show you more examples of the Struts HTML tags.