title: Disable Auto-complete(autocomplete="off") using STRUTS
body: <p>i tried to disable auto complete(autocomplete="off") in struts framework,the process i followed is 
  1)In Strut-html.tld file i had few attributes of TextTag so added autocomplete attribute</p>
  
  <pre><code>&lt;tagclass&gt;org.apache.struts.taglib.html.TextTag&lt;/tagclass&gt;
  &lt;attribute&gt;
  &lt;name&gt;autocomplete&lt;/name&gt;
  &lt;required&gt;false&lt;/required&gt;
  &lt;rtexprvalue&gt;true&lt;/rtexprvalue&gt;   
  &lt;/attribute&gt;
  </code></pre>
  
  <p>2)i wrote a class for customtag  by extending org.apache.struts.taglib.html.TextTag</p>
  
  <pre><code>import org.apache.struts.taglib.html.TextTag.*;
  
  public class TextTag extends org.apache.struts.taglib.html.TextTag { 
  
  
  private static final long serialVersionUID = 1L;
  private String autocomplete = null;
  
  public String getAutocomplete()
  { return autocomplete; }
  
  public void setAutoComplete(String autocomplete)
  {
  this.autocomplete = autocomplete; 
  
  } 
  
  protected void prepareOtherAttributes(StringBuffer sb) { 
  
  
  if (autocomplete != null) { 
  
  sb.append(" autocomplete=\""+autocomplete+"\""); 
  }
  }
  }
  </code></pre>
  
  <p>3) And in jsp page i added autocomplete="off" attribute</p>
  
  <p>so when i run my application im getting the following error</p>
  
  <pre><code>/index.jsp(1): Error in using tag library uri='/tags/struts-html' prefix='html':
  The Tagclass'org.apache.struts.taglib.html.FormTag' has no setter method corresponding  
  to TLD declared attribute 'name', (JSP 1.1 spec, 5.4.1)  probably occurred due to an 
  error in /index.jsp line 1:  
  &lt;%@ taglib uri="/tags/struts-html" prefix="html" %&gt;
  </code></pre>
  
  <p>Some one please help me to solve this error and i tried with javascript as well but its not working.</p>
  
  <pre><code>function DisableAutocomplete()
  {
  var AC_Disable_login=document.forms[0].elements['loginID'];
  AC_Disable_login.setAttribute ("autocomplete", "off");
  }
  </code></pre>