aspose file tools
The moose likes JSP and the fly likes XHTML validation JSTL tags Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "XHTML validation JSTL tags" Watch "XHTML validation JSTL tags" New topic
Author

XHTML validation JSTL tags

Graeme Byers
Ranch Hand

Joined: Apr 16, 2004
Posts: 127
Is it possible to prevent http://validator.w3.org from flagging tags

as XHTML transitional errors ?

Thank you
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

I don't know the answer to that, but why would you try to validate a JSP as XHTML?
Graeme Byers
Ranch Hand

Joined: Apr 16, 2004
Posts: 127
Because I will be applying CSS to the XHTML part of the page many authors recommend prior validation for that reason.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56179
    
  13

No. JSP is not valid XHTML.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1003
There is an XHTML syntax for importing tag libraries.

You include them as part of the <jsp:root> tag


Check out the Syntax Reference for the Taglib tag at http://java.sun.com/products/jsp/syntax/2.0/syntaxref2012.html#1003416

Note that in my limited experience with XHTML, trying to write XHTML compliant JSP pages is a real pain in the proverbial...
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

Stefan Evans wrote:There is an XHTML syntax for importing tag libraries.

But even if you do write your JSP in such a way that it is well-formed XHTML, it's still possible for the JSP to generate output which isn't well-formed XHTML.
Note that in my limited experience with XHTML, trying to write XHTML compliant JSP pages is a real pain in the proverbial...

+1 to that. In my younger and more idealistic days I tried to do that. Not any more.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56179
    
  13

Stefan Evans wrote:There is an XHTML syntax for importing tag libraries.

That's compliant with XML, but not XHTML.
 
I agree. Here's the link: jrebel
 
subject: XHTML validation JSTL tags
 
Similar Threads
Including JSPX in other JSPX
Binding 'rendered' with non-boolean value
get the size of list in jsp
request not forwarding...
Need help in xhtml files