File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes HTML validation with struts tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Meteor in Action this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HTML validation with struts tags" Watch "HTML validation with struts tags" New topic

HTML validation with struts tags

Gezza Hall
Ranch Hand

Joined: Jan 04, 2005
Posts: 33
Hi guys.

I'm trying to get my HTML to validate to HTML standards, but my form elements are failing.

The following line in my code:

translates to:

This doesn't validate, as there is no closing slash, ie

Any suggestions please?
Franck Tranchant
Ranch Hand

Joined: Aug 07, 2003
Posts: 75

Try this :
Using this tag in a page tells all other html taglib tags to render themselves as XHTML 1.0.
As a result, the closing brace will be added when closing elements.
[ March 16, 2005: Message edited by: Franck Tranchant ]

Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
I believe the html struts tag has adhered to the HTML standards. The end tag for input element is not required, in fact I believe it is "forbidden".

Input Element

I am not sure if this is what you are asking. So I hope it helps.
Gezza Hall
Ranch Hand

Joined: Jan 04, 2005
Posts: 33
Excellent, thanks guys.
I agree. Here's the link:
subject: HTML validation with struts tags