aspose file tools*
The moose likes Struts and the fly likes Struts 2 form element generation - spurious name attribute screwing up xhtml validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 form element generation - spurious name attribute screwing up xhtml validation" Watch "Struts 2 form element generation - spurious name attribute screwing up xhtml validation" New topic
Author

Struts 2 form element generation - spurious name attribute screwing up xhtml validation

Andy Wilson
Ranch Hand

Joined: Jun 26, 2009
Posts: 32
I'm using Struts 2 and have a problem with the way it generates HTML. It seems to insist on
sticking in a name attribute in the generated form tag, whether I ask for it or not.
This is screwing up some tests I have to use that validate against XHTML 1.0. I've looked
at the form.ftl defintion in in the struts core jar (version 2.0.14) and it doesn't seem
to be responsible for this (it simply looks for a 'name' parameter, and generates a
name attribute if it exists). So I can't get rid of this by simply overriding the form
template.

Anyone have any idea of what might be going on?

Cheers.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts 2 form element generation - spurious name attribute screwing up xhtml validation