G
galpix
Hi,
I'm running Tomcat 5.5.9 with Cocoon 2.1.7 on MacOS X.
I'm trying to generate HTML from a jsp source and applying an XSLT
stylesheet. I can generate html from an XML source file, but not jsp.
After several tries, I found the example here :
http://www.devx.com/opensource /Article/21670/0/page/2
I have :
cocoon/pageTwo.jsp
cocoon/doc2html.xsl
In my sitemap I have :
<mapipeline>
<map:match pattern="pageTwo.html">
<map:generate src="pageTwo.jsp" />
<map:transform src="doc2html.xsl"/>
<map:serialize type="html"/>
</map:match>
</mapipeline>
First question : Do I need to specify that the source is jsp or not in
the map:generate tag ?
<map:generate src="pageTwo.jsp" type="jsp" />
The cocoon docs seem to indicate that I should, but I've never seen an
example with it.
Without the 'type="jsp"' I get this when I view
localhost:8080/simplej/pageTwo.html :
Message: The markup in the document preceding the root element must be
well-formed.
Description: org.apache.cocoon.ProcessingException: Error executing
pipeline.:
file:/usr/local/jakarta-tomcat-5.5.9/webapps/simplej/pageTwo.jsp:2:2rg.xml.sax.SAXParseException:
The markup in the document preceding the root element must be
well-formed.
(note that simplej is just cocoon under a different name, I copied the
whole directory structure)
Now, with :
<map:generate src="pageTwo.jsp" type="jsp" /> , I get this error
message :
Message: Premature end of file.
Description: org.apache.cocoon.ProcessingException: SAXException while
parsing JSPEngine output: org.xml.sax.SAXParseException: Premature end
of file.
Either way, I can't get cocoon to generate html. Any ideas ?
I tried with the example I copy pasted, and my own jsp files, all
outputing valid XML.
Many thanks,
galpi
I'm running Tomcat 5.5.9 with Cocoon 2.1.7 on MacOS X.
I'm trying to generate HTML from a jsp source and applying an XSLT
stylesheet. I can generate html from an XML source file, but not jsp.
After several tries, I found the example here :
http://www.devx.com/opensource /Article/21670/0/page/2
I have :
cocoon/pageTwo.jsp
cocoon/doc2html.xsl
In my sitemap I have :
<mapipeline>
<map:match pattern="pageTwo.html">
<map:generate src="pageTwo.jsp" />
<map:transform src="doc2html.xsl"/>
<map:serialize type="html"/>
</map:match>
</mapipeline>
First question : Do I need to specify that the source is jsp or not in
the map:generate tag ?
<map:generate src="pageTwo.jsp" type="jsp" />
The cocoon docs seem to indicate that I should, but I've never seen an
example with it.
Without the 'type="jsp"' I get this when I view
localhost:8080/simplej/pageTwo.html :
Message: The markup in the document preceding the root element must be
well-formed.
Description: org.apache.cocoon.ProcessingException: Error executing
pipeline.:
file:/usr/local/jakarta-tomcat-5.5.9/webapps/simplej/pageTwo.jsp:2:2rg.xml.sax.SAXParseException:
The markup in the document preceding the root element must be
well-formed.
(note that simplej is just cocoon under a different name, I copied the
whole directory structure)
Now, with :
<map:generate src="pageTwo.jsp" type="jsp" /> , I get this error
message :
Message: Premature end of file.
Description: org.apache.cocoon.ProcessingException: SAXException while
parsing JSPEngine output: org.xml.sax.SAXParseException: Premature end
of file.
Either way, I can't get cocoon to generate html. Any ideas ?
I tried with the example I copy pasted, and my own jsp files, all
outputing valid XML.
Many thanks,
galpi