• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SAXParseException

 
Milan Vasic
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there this is my code:

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
<jsp:directive.page contentType="text/html; charset=UTF-8" />
<jsputput doctype-root-element="html"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

some html code....


</html>
</jsp:root>


I still got the exception :org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed. Doeas anyone know why?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are methods in SAXParseException to get the line and column number that the parser objects to.

Bill
 
Milan Vasic
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tnx Bill.

vaske
 
Milan Vasic
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try to validate my jsp with a loot of on line validators, and my jsp is well formated, but when I try to parse that file with parse method on documentbuilder object I got this error.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you been able to extract the line and column from the exception?
How is the jsp source code being generated?

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic