cocoon : jsp as source file

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 :

<map:pipeline>
<map:match pattern="pageTwo.html">
<map:generate src="pageTwo.jsp" />
<map:transform src="doc2html.xsl"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>

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:2:eek:rg.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top