Hello everyone,
I'm trying to use an entity in my
JSP document, the XML syntax of JSP pages (I had to replace the ampersand and hash characters by a %character% construct due to misinterpretation of this forum software):
<!DOCTYPE jsp:root [
<!ENTITY nbsp "%ampersand%%hash%160;">
]>
<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page">
%ampersand%nbsp;
</jsp:root>
Jasper, the JSP compiler of
Tomcat, always throws the exception "Element type 'jsp:root' must be declared.". If I remove the DOCTYPE declaration and the %ampersand%nbsp; all works as expected.
What is the cause of the exception? What does it mean in this case?
Note that the "jsp"-namespace is declared, do I need to declare it a second type just for the DOCTYPE? How?
Regards,
Andreas