You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Trenton D. Adams" <tr...@trentonadams.ca> on 2007/07/20 03:46:35 UTC
XML parsing fails
The following JSP fails. Is there something basic that would be causing
the error "javax.servlet.jsp.JspException: Content is not allowed in
prolog"???
FYI: Note that I'm pointing to a valid XML document on the W3C site. I
also create my own, making sure no characters of any kind exist before
the xml starting directive.
<%--
Created by IntelliJ IDEA.
User: trenta
Date: 19-Jul-2007
Time: 6:53:18 PM
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head><title>Simple jsp page</title></head>
<body>
<!-- parse an XML document -->
<c:import url="http://www.w3schools.com/xml/note.xml" var="xml"/>
<x:parse doc="${xml}" var="doc"/>
</body>
</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: XML parsing fails
Posted by "Trenton D. Adams" <tr...@trentonadams.ca>.
Actually, I'm a total dunce. I'm using an older servlet/JSP, which
still requires the "<%@ page isELIgnored="false"%>" directive.
Trenton D. Adams wrote:
> The following JSP fails. Is there something basic that would be
> causing the error "javax.servlet.jsp.JspException: Content is not
> allowed in prolog"???
>
> FYI: Note that I'm pointing to a valid XML document on the W3C site.
> I also create my own, making sure no characters of any kind exist
> before the xml starting directive.
>
> <%--
> Created by IntelliJ IDEA.
> User: trenta
> Date: 19-Jul-2007
> Time: 6:53:18 PM
> To change this template use File | Settings | File Templates.
> --%>
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
> <html>
> <head><title>Simple jsp page</title></head>
> <body>
> <!-- parse an XML document -->
> <c:import url="http://www.w3schools.com/xml/note.xml" var="xml"/>
> <x:parse doc="${xml}" var="doc"/>
> </body>
> </html>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org