In my struts2 application, I use javascript to disable autocomplete
for (i=0; i<document.forms.length; i++) { document.forms[i].setAttribute("AutoComplete","off"); }
Call this code when the page loads. Since you should know that struts tags are converted to plain HTML tags when the page loads (you can check this by looking at the page source), so after loading the page the struts2 <s:form>
will be a simple HTML <form>
so you can set autocomplete attribute
source share