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
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
author & internet detective

Joined: May 26, 2003
Posts: 33119

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

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, 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: 15302

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.
I agree. Here's the link:
subject: turn autocomplete off in Struts?
It's not a secret anymore!