cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gajo Csaba" <cs...@enyem.com>
Subject How to use a simple XSP page?
Date Sun, 18 Feb 2007 09:58:00 GMT
Hello everyone!

I've just started learning cocoon. I passed the basics of transforming an  
xml into html with my own stylesheet, and now I want to do some basic  
action with an XSP page. I used the tutorial from the Cocoon web site:  
http://cocoon.apache.org/2.1/userdocs/xsp/logicsheet.html as well as  
others on that site.

Basically the problem I'm having is that when I create an XSP file, let's  
say test.xsp, I get an error saying that the file is not associated with a  
pipeline. Since on the Apache site it is not mentioned how should I  
configure XSP pages, I wrote this into my sitemap:

<map:match pattern="**.xsp">
   <map:generate type="serverpages" src="/docs/{1}.xsp"/>
   <map:serialize/>
</map:match>

And I always get the following error:

UnnamedSelector: ComponentSelector could not find the component for hint  
[xsp] (key [xsp])
file:/D:/cocoon/build/webapp/tutor2/sitemap.xmap - 76:22	<map:serialize>	
file:/D:/cocoon/build/webapp/tutor2/sitemap.xmap - 75:65	<map:generate  
type="serverpages">	
file:/D:/cocoon/build/webapp/sitemap.xmap - 1035:92	<map:mount>

As far as I understand this it says it cannot find a component to  
transform the XSP page into an XML. Could someone provide me with a proper  
configuration? What should I enter into my site map so that XSP pages  
would work?

For example, I created this XSP page:

<?xml version="1.0" encoding="UTF-8"?>
<xsp:page xmlns:xsp="http://apache.org/xsp">
	
	<xsp:logic>
		// this could be arbitrarily complex Java code, JDBC queries, etc.
		String msg = "Hello, world!";
	</xsp:logic>
	
	<greeting>
		<xsp:expr>msg</xsp:expr>
	</greeting>
	
</xsp:page>


It should generate an XML with "Hello world" between the <greeting> tags.  
Then this XML should be transformed to HTML. How do I do this? By placing  
the test.xsp simply into the docs directory I only get the error, there  
doesn't seem to be an auto-configuration.

Thanks, Csaba


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message