This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes turn autocomplete off in Struts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "turn autocomplete off in Struts?" Watch "turn autocomplete off in Struts?" New topic

turn autocomplete off in Struts?

Eric Sexton
Ranch Hand

Joined: Sep 12, 2003
Posts: 133
Is there any way to do this within struts? The form tag doesn't seem to support this.
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30353

What IDE are you using? The IDE is providing the autocomplete, not Struts.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Eric Sexton
Ranch Hand

Joined: Sep 12, 2003
Posts: 133
Sorry, maybe I wasn't clear on my question. In the vanilla <form> tag in html(or even the input tag), I can force autocomplete to be off (autocomplete = off). In the <struts:form> tag, there is no autocomplete. I would just like to make sure that values entered into a form aren't stored in autocomplete.

BTW, I'm using IBM WSAD 5.1.2.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299

Googling turns up this page:

If you use <html :form></html> in Struts, there is no way for you to specify the autocomplete attribute. You will need to extend the FormTag class to achieve this.

Also note that the AutoComplete="on/off" attribute is an IE only attribute. It is not part of the HTML spec. I would wager that this is why it is not included in the Struts html:form tag.

GenRocket - Experts at Building Test Data
Eric Sexton
Ranch Hand

Joined: Sep 12, 2003
Posts: 133
Yeah, I did see that on Google.

It's not that big of a deal to have in this particular app, but I can see it being more important in some future apps we develop. 90 percent of our customers are using IE. Thanks for the response Gregg.
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

Give everything really stupid names and it might fool autocomplete.

A good workman is known by his tools.
Don't get me started about those stupid light bulbs.
subject: turn autocomplete off in Struts?