You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Miguel Lopez <ma...@gmail.com> on 2012/12/17 16:40:03 UTC

Autocomplete = "off" in ?

Good morning everyone, this is my first mail in the list and english is not
my native language so please dont be too hard with me.

First of all, i am using Struts 1.3.10.

I have to put the autocomplete="off" attribute to my web registration form.
<html:form> tag does not support such attribute so i searched around and
found few workarounds:

- Adding the attribute to the form with javascript when page loads. This
works fine but there is a big issue, vulnerabilities scanners still warn
about the form being without the autocomplete attribute and i am asked in
my job to remove the warning.

- Creating a custom tag extending
from org.apache.struts.taglib.html.FormTag adding autocomplete parameter to
it, so i created a <extended:extendedform> tag. This doesnt work as i get
this error : javax.servlet.jsp.JspException: Cannot find bean:
"org.apache.struts.taglib.html.BEAN" in any scope. Googling around, it
seems to be caused by nested <html:text> <html:option> <html:select> tags
need to be within a <html:form> tag.

I would need someone to give me some insight about any other workaround or
helping me with any of the previous.

Thank you

Re: Autocomplete = "off" in ?

Posted by Lukasz Lenart <lu...@apache.org>.
2012/12/17 Miguel Lopez <ma...@gmail.com>:
> Good morning everyone, this is my first mail in the list and english is not
> my native language so please dont be too hard with me.
>
> First of all, i am using Struts 1.3.10.
>
> I have to put the autocomplete="off" attribute to my web registration form.
> <html:form> tag does not support such attribute so i searched around and
> found few workarounds:
>
> - Adding the attribute to the form with javascript when page loads. This
> works fine but there is a big issue, vulnerabilities scanners still warn
> about the form being without the autocomplete attribute and i am asked in
> my job to remove the warning.
>
> - Creating a custom tag extending
> from org.apache.struts.taglib.html.FormTag adding autocomplete parameter to
> it, so i created a <extended:extendedform> tag. This doesnt work as i get
> this error : javax.servlet.jsp.JspException: Cannot find bean:
> "org.apache.struts.taglib.html.BEAN" in any scope. Googling around, it
> seems to be caused by nested <html:text> <html:option> <html:select> tags
> need to be within a <html:form> tag.
>
> I would need someone to give me some insight about any other workaround or
> helping me with any of the previous.

Did try to extend existing FormTag ? Or at least take a look on
existing implementation of FormTag which already support autocomplete

https://svn.apache.org/repos/asf/struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/FormTag.java


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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