Home Struts Struts2 Struts2uitags Password Tag (Form Tag) Example



Password Tag (Form Tag) Example
Posted on: July 28, 2007 at 12:00 AM
In this section, we are going to describe the password tag .

Password Tag (Form Tag) Example

     

In this section, we are going to describe the password tag. The password tag is a UI tag that renders an HTML input tag of type password.

Add the following code snippet into the struts.xml file.
struts.xml

<action name="passwordTag">
  <result>/pages/uiTags/passwordTag.jsp</result>
</action>

Create a jsp using the tag <s:password>. It renders an HTML input tag of type password.

passwordTag.jsp

<%taglib prefix="s" uri="/struts-tags" %>
<html>
  <head>
  <title>Password Tag Example!</title> 
  </head>
  <body>
  <h1><span style="background-color: #FFFFcc">Password Tag Example!
</span></h1>

 <s:form>
 <s:password label="Enter Password" name="password" size="10" maxlength="8" />
  </s:form>
  </body>
</html>

Output of the passwordTag.jsp:

Related Tags for Password Tag (Form Tag) Example:
htmluiinputpasswordtypewordtagrendereputpeinmlpassasmendsathtmishassrdrenthswhatndonp


More Tutorials from this section

Ask Questions?    Discuss: Password Tag (Form Tag) Example   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.