Password Tag (Form Tag) Example

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:

Advertisements

Ads

 

We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.

Share on Google+Share on Google+

Password Tag (Form Tag) Example

Posted on: July 28, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

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

Post your Comment


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

Ads

 

Ads