You can make your life very easy by simply adding this to the beginning of your sitemap:
+ begin of sitemap --------------------------------------------- <?xml version="1.0"?> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> <map:components> <map:generators default="file"/> <map:transformers default="xslt"/> <map:readers default="resource"/> <map:serializers default="html"/> <map:matchers default="wildcard"/> </map:components> <!-- now your own stuff as you expressed it in your email ... --> + end of sitemap ----------------------------------------------- By this you get all comoponents from $rootsitemap ready at hand in your subsitemap. Dont bother with component definitions until you really need to express something different from the rootsitemap ;-) regards, hussayn Lionel Crine wrote:
you need a reader :
<map:readers default="resource">
<map:reader logger="sitemap.reader.resource" name="resource" pool-max="32" src="org.apache.cocoon.reading.ResourceReader"/>
</map:readers>
in the components
see the sitemaAt 09:55 13/02/2003 +0100, you wrote:
hi
i got a problem with cocoon 2
i would like to serve static page
so i write sitemap.xmap like this
-------------------------------------------------
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:components>
<map:generators>
<map:generator name="serverpages"
src="org.apache.cocoon.generation.ServerPagesGenerator"/>
</map:generators>
<map:serializers>
<map:serializer name="xml" mime-type="text/xml"
src="org.apache.cocoon.serialization.XMLSerializer"/>
</map:serializers>
<map:matchers>
<map:matcher name="wildcard"
src="org.apache.cocoon.matching.WildcardURIMatcher"/>
</map:matchers>
</map:components>
<map:pipelines>
<map:pipeline>
<map:match pattern="index.html">
<map:read src="index.html" mime-type="text/html"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
------------------------------------------------
but it doesnt work
in browser i always obtaint this message
Cocoon 2 - Internal server error
----------------------------------------------------------------------------
----
type fatal
message Language Exception
description org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
sitemap_xmap: Line 241, column 54: '}' expected Line 63, column 11: class
org.apache.cocoon.www.sitemap_xmap should be declared abstract; it does not
define method process(org.apache.cocoon.environment.Environment,
org.apache.cocoon.components.pipeline.StreamPipeline,
org.apache.cocoon.components.pipeline.EventPipeline) in class
org.apache.cocoon.sitemap.AbstractSitemap Line 0, column 0: 2 errors
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
stack-trace
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
sitemap_xmap:
Line 241, column 54: '}' expected
Line 63, column 11: class org.apache.cocoon.www.sitemap_xmap should be
declared abstract; it does not define method
process(org.apache.cocoon.environment.Environment,
org.apache.cocoon.components.pipeline.StreamPipeline,
org.apache.cocoon.components.pipeline.EventPipeline) in class
org.apache.cocoon.sitemap.AbstractSitemap
Line 0, column 0:
2 errors
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR
esource(ProgramGeneratorImpl.java:360)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:312)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:267)
at java.lang.Thread.run(Thread.java:536)
Caused by: org.apache.cocoon.components.language.LanguageException: Error
compiling sitemap_xmap:
Line 241, column 54: '}' expected
Line 63, column 11: class org.apache.cocoon.www.sitemap_xmap should be
declared abstract; it does not define method
process(org.apache.cocoon.environment.Environment,
org.apache.cocoon.components.pipeline.StreamPipeline,
org.apache.cocoon.components.pipeline.EventPipeline) in class
org.apache.cocoon.sitemap.AbstractSitemap
Line 0, column 0:
2 errors
at
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(
JavaLanguage.java:243)
at
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguag
e.load(CompiledProgrammingLanguage.java:207)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
eResource(ProgramGeneratorImpl.java:417)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR
esource(ProgramGeneratorImpl.java:353)
... 3 more
org.apache.cocoon.components.language.LanguageException: Error compiling
sitemap_xmap:
Line 241, column 54: '}' expected
Line 63, column 11: class org.apache.cocoon.www.sitemap_xmap should be
declared abstract; it does not define method
process(org.apache.cocoon.environment.Environment,
org.apache.cocoon.components.pipeline.StreamPipeline,
org.apache.cocoon.components.pipeline.EventPipeline) in class
org.apache.cocoon.sitemap.AbstractSitemap
Line 0, column 0:
2 errors
at
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(
JavaLanguage.java:243)
at
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguag
e.load(CompiledProgrammingLanguage.java:207)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
eResource(ProgramGeneratorImpl.java:417)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR
esource(ProgramGeneratorImpl.java:353)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:312)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:267)
at java.lang.Thread.run(Thread.java:536)
request-uri
/cocoonsamples/index.html
path-info
index.html
------------------------------------------------
i dont understand
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
--------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
-- Dr. Hussayn Dabbous SAXESS Software Design GmbH Neuenh�fer Allee 125 50935 K�ln Telefon: +49-221-56011-0 Fax: +49-221-56011-20 E-Mail: [EMAIL PROTECTED] --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
