Home Struts Struts2 Struts2uitags Password Tag (Form Tag) Example

Related Tutorials


 
 

Share on Google+Share on Google+

Password Tag (Form Tag) Example

Advertisement
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:

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 28, 2007

Related Tutorials

Discuss: Password Tag (Form Tag) Example   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com