• Post Reply Bookmark Topic Watch Topic
  • New Topic

XHTML validation JSTL tags

 
Graeme Byers
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to prevent http://validator.w3.org from flagging tags

as XHTML transitional errors ?

Thank you
 
Paul Clapham
Sheriff
Posts: 21868
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know the answer to that, but why would you try to validate a JSP as XHTML?
 
Graeme Byers
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. JSP is not valid XHTML.
 
Stefan Evans
Bartender
Posts: 1822
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21868
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stefan Evans wrote:There is an XHTML syntax for importing tag libraries.

That's compliant with XML, but not XHTML.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!