Is there a way to use Struts so that Forms do not have to use the name attribute. The name attrinbute has been depreciated by the W3C and therefore fails validation.
This is a major concern as I have a requirement that the site needs to be XHTML 1.0 Strict compliant.
Any workarounds/ideas?
Thanks,
Connor
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Is there a way to use Struts so that Forms do not have to use the name attribute. The name attrinbute has been depreciated by the W3C and therefore fails validation.
This is a major concern as I have a requirement that the site needs to be XHTML 1.0 Strict compliant.
Any workarounds/ideas?
Thanks,
Connor
In my experience, XHTML 1.0 Transitional is just as good as Strict as it's still valid XML - just some different attributes that are allowed.
Regardless, there is a way for you to do this. With Struts 1.2.7, you can add:
<html:xhtml />
to the top of your page, and the "name" attribute will go away. Be aware that this will cause any "focus" or client-side javascript to fail.
http://raibledesigns.com/page/rd?entry=failed_upgrade_to_struts_1
The workaround is to specify the styleId attribute of your form tag, then use the commons-validator fresh out of trunk.
Don