> From: icewind0 [mailto:[EMAIL PROTECTED]]
> 
> Hello,
> 
> What is the correct way to serve non xml content with cocoon? For
> example, if I have a directory that I just want served as is (images,
> html, etc) how do I tell cocoon to do that? Will it serve these things
> by default (it doesn't seem to) or does everything that you want
served
> have to be explicitly set in the sitemap?

That's the beauty of Cocoon (once you get it): you have to specify
*everything* you want explicitly (empty sitemap == *no* content served),
and once you do that, it will serve everything you told him by default
:)

Very simple example (actually, this one is too un-secure for production
use):

<map:match pattern="**/*.*">
  <map:read src="{1}/{2}.{3}" mime-type="image/{3}"/>
</map:match>

will correctly serve "by default" any jpeg and gif file from any
directory, but will not work (correctly) for other types.

Better and more "right" example:

<map:match pattern="images/**/*.jpg">
  <map:read src="{1}/{2}.jpg" mime-type="image/jpeg"/>
</map:match>
<map:match pattern="images/**/*.gif">
  <map:read src="{1}/{2}.gif" mime-type="image/gif"/>
</map:match>

(so your sysadmins would sleep better)


> Does the situation change if
> the servlet container (in my case tomcat) is running under apache with
> mod_jk?

No difference, unless you explicitly change configuration files.

Vadim


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to