problem found. a cocoon:/{1} created always an internal-only request and
my sub sitemap expects an external request. how can i create an external
request from an internal action? i dont want to reimplement SitemapSource
regards
thomas
Thomas Markus schrieb:
hi all,
i try to cache the output from a sitemap (and i cant use cached
pipelines). this sitemap returns only generated content (html and
images). i created an action thats verifies my cache and calls an uri
to store pipeline output. my applications works fine without this
action.
it "works" but i have 2 problems:
- html content is parsed as xml. my original pipeline has a <serialize
type="html" /> but content is in xml (with <?xml?> header and
entities). binary content like images are ok
- property mimetype from source is always empty (see java part below)
how can i access the correct content and mimetype? system is cocoon 2.1.7
regards
thomas
<!--pipeline -->
<map:pipelines>
<map:pipeline internal-only="true">
<map:match pattern="**">
<map:mount uri-prefix="" src="../sitemap.xmap" />
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="**"> <map:act
type="checkcache" src="cocoon:/{1}">
<map:read src="{file}" mimetype="{mimetype}" />
</map:act>
<map:mount uri-prefix="" src="../sitemap.xmap" />
</map:match>
</map:pipeline>
</map:pipelines>
/* action snippet */
Source src = resolver.resolveURI(source);
try {
FileOutputStream out = new FileOutputStream(file);
try {
InputStream in = src.getInputStream();
IOUtil.copy(in, out);
} finally {
out.close();
}
// this is never correct!
src.getMimeType();
} finally {
resolver.release(src);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:[email protected]
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]