You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Pratt <th...@gmail.com> on 2008/04/23 06:41:14 UTC

Disabling Browser AutoComplete in Struts tags

Is it possible to supply the autocomplete="off" parameter using the
<s:form>, <s:textfield>, or <s:password> tags?

Whether or not this is truly effective, my management wants our userid
and password fields to supply this parameter to bring piece, harmony
and security to the world wide web.  Is this possible using the Stuts
Tags?
  (*Chris*)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Disabling Browser AutoComplete in Struts tags

Posted by Wes Wannemacher <we...@wantii.com>.
Chris,

Check the TLD file for the struts tags... I'm looking at the HEAD right
now and each of those tags has the following parameter - 

<dynamic-attributes>true</dynamic-attributes>

Which, in JSP language means that you can pass attributes w/o putting
them in the TLD file. In Struts, this means that if you put them on the
s:* tag, they will be added to the generated HTML tag. I am not sure
when this was introduced, but many of the tags allow you to pass
attributes like this.

-Wes


On Tue, 2008-04-22 at 23:50 -0700, Chris Pratt wrote:
> So, I'm hearing the answer is "you can't"?  At least not without
> extending the system myself?  Thanks, I'll work around the system
> again.
>   (*Chris*)
> 
> On Tue, Apr 22, 2008 at 11:30 PM, Toni Lyytikäinen <to...@gmail.com> wrote:
> > You could probably create your own theme and/or template for the tag where
> >  you set the attribute in the template. But why not just use standard xhtml
> >  tags for this - I mean just type it like this in the page:
> >
> >  < input type="text" name="userid" autocomplete="off" ... />
> >
> >  (extra space there to not make the email client try to interpret that as
> >  xhtml)
> >
> >  On Wed, Apr 23, 2008 at 7:41 AM, Chris Pratt <th...@gmail.com>
> >  wrote:
> >
> >
> >
> >  > Is it possible to supply the autocomplete="off" parameter using the
> >  > <s:form>, <s:textfield>, or <s:password> tags?
> >  >
> >  > Whether or not this is truly effective, my management wants our userid
> >  > and password fields to supply this parameter to bring piece, harmony
> >  > and security to the world wide web.  Is this possible using the Stuts
> >  > Tags?
> >  >  (*Chris*)
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >  > For additional commands, e-mail: user-help@struts.apache.org
> >  >
> >  >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Disabling Browser AutoComplete in Struts tags

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Chris Pratt wrote:
> So, I'm hearing the answer is "you can't"?  At least not without
> extending the system myself?  Thanks, I'll work around the system
> again.
>   (*Chris*)
>
>   
If you use FTL you can add the attribute directly to the form, input and 
password tags. 

Customising a tag's template as Toni described only takes a few minutes 
and they're intended for that purpose.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Disabling Browser AutoComplete in Struts tags

Posted by Chris Pratt <th...@gmail.com>.
So, I'm hearing the answer is "you can't"?  At least not without
extending the system myself?  Thanks, I'll work around the system
again.
  (*Chris*)

On Tue, Apr 22, 2008 at 11:30 PM, Toni Lyytikäinen <to...@gmail.com> wrote:
> You could probably create your own theme and/or template for the tag where
>  you set the attribute in the template. But why not just use standard xhtml
>  tags for this - I mean just type it like this in the page:
>
>  < input type="text" name="userid" autocomplete="off" ... />
>
>  (extra space there to not make the email client try to interpret that as
>  xhtml)
>
>  On Wed, Apr 23, 2008 at 7:41 AM, Chris Pratt <th...@gmail.com>
>  wrote:
>
>
>
>  > Is it possible to supply the autocomplete="off" parameter using the
>  > <s:form>, <s:textfield>, or <s:password> tags?
>  >
>  > Whether or not this is truly effective, my management wants our userid
>  > and password fields to supply this parameter to bring piece, harmony
>  > and security to the world wide web.  Is this possible using the Stuts
>  > Tags?
>  >  (*Chris*)
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  > For additional commands, e-mail: user-help@struts.apache.org
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Disabling Browser AutoComplete in Struts tags

Posted by Toni Lyytikäinen <to...@gmail.com>.
You could probably create your own theme and/or template for the tag where
you set the attribute in the template. But why not just use standard xhtml
tags for this - I mean just type it like this in the page:

< input type="text" name="userid" autocomplete="off" ... />

(extra space there to not make the email client try to interpret that as
xhtml)

On Wed, Apr 23, 2008 at 7:41 AM, Chris Pratt <th...@gmail.com>
wrote:

> Is it possible to supply the autocomplete="off" parameter using the
> <s:form>, <s:textfield>, or <s:password> tags?
>
> Whether or not this is truly effective, my management wants our userid
> and password fields to supply this parameter to bring piece, harmony
> and security to the world wide web.  Is this possible using the Stuts
> Tags?
>  (*Chris*)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>