You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stuart Roebuck <sr...@adolos.com> on 2000/07/13 19:13:21 UTC
[Q][Cocoon 2] sitemap / web.xml and letting images through
I've just installed Cocoon 2 (appreciating that this is pre-release stuff)
- MacOS X, Tomcat 3.1 - I've been using Cocoon 1 for some time now under
Apache and/or Tomcat with no problems.
I set up my web.xml file to pass everything to Cocoon2 e.g.
<servlet-mapping>
<servlet-name>Cocoon2</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
but then I have problems with my graphic files which are within the site -
Cocoon tries to process them. As far as I know there is no option in the
Cocoon2 sitemap syntax to specify that certain URIs should just
'pass-through'. [I guess this makes no-sense anyway, because there's no
point in sending stuff through Cocoon that doesn't need to go that way].
So...
I changed the web.xml file to just pass through requests for ".html"
files, because they are the only ones I need to process with Cocoon. That
gave me:
<servlet-mapping>
<servlet-name>Cocoon2</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
My sitemap contains the following:
<process uri="index.html" source="../index.xml">
<generator name="file" />
<transformer name="xslt">
<parameter name="stylesheet" value="../look/general/index.xslt" />
</transformer>
<serializer name="html">
<parameter name="contentType" value="text/html" />
</serializer>
</process>
[The ../ is there because the cocoon.xconf file is in the WEB-INF directory]
Now I try to access the same page "index.html" and I get the response:
Cocoon 2.0: Version 2.0
Ready to process requests...
And it just sits there.
Any idea what I'm doing wrong?
I can only think that Cocoon might be accessing files through Tomcat and
that I may be required to allow other files through (other than ".html")
but allowing ".xml" and ".xslt" doesn't seem to be enough.
Thanks,
Stuart
Re: [Q][Cocoon 2] sitemap / web.xml and letting images through
Posted by Paul Russell <pa...@luminas.co.uk>.
On Fri, Jul 14, 2000 at 12:17:28AM +0100, Stuart Roebuck wrote:
> 1. The working example cocoon setup provided with the sample pages
> does not conform to the sitemap-working-draft.xmap format at all.
Indeed.
> 2. The sitemap-working-draft.xmap file doesn't work in its place at
> all, even after you remove the example extras and tidy up the odd
> typo which prevents it from being proper XML.
Indeed.
> Now, I appreciate this is pre-release, so I'm not looking for anyone
> to give any long explanations - I can work most things out from
> working examples. As far as I can put two-and-two together, the
> whole sitemap thing is currently in a major stage of transition and
> is possibly broken / not working yet. The sitemap-working-draft.xmap
> file shows how it should be, and the file in the samples, shows how
> it was.
The sitemap was recently redesigned. The new version (in sitemap-working-
draft.xmap) is *much* more powerful than the old. Giacomo is currently
in the process of implementing the sitemap code generators etc for the
new sitemap. Give it a few weeks and it should be there.
> I'm I on the right track - is there anywhere I can look that will
> show a current working example, or is there a date in the past that I
> can use to checkout a previous version of Cocoon 2 prior to the newer
> changes coming into effect.
I've got a ye olde version I use for offline generation which appears
to be dated at or around May 26th. I should stress that Cocoon2 is
*alpha*; we really wouldn't recommend attempting to use it for live
stuff yet, but if you just want to play/contribute, that's great!
Cheers,
Paul
--
Paul Russell <pa...@luminas.co.uk>
Technical Director, http://www.luminas.co.uk
Luminas Ltd.
Re: [Q][Cocoon 2] sitemap / web.xml and letting images through
Posted by Stuart Roebuck <sr...@adolos.com>.
>Stuart Roebuck wrote:
>>
>> I've just installed Cocoon 2 (appreciating that this is pre-release stuff)
>> - MacOS X, Tomcat 3.1 - I've been using Cocoon 1 for some time now under
>> Apache and/or Tomcat with no problems.
>>
>> I set up my web.xml file to pass everything to Cocoon2 e.g.
>>
>> <servlet-mapping>
>> <servlet-name>Cocoon2</servlet-name>
>> <url-pattern>/</url-pattern>
>> </servlet-mapping>
>>
>> but then I have problems with my graphic files which are within the site -
>> Cocoon tries to process them. As far as I know there is no option in the
>> Cocoon2 sitemap syntax to specify that certain URIs should just
>> 'pass-through'. [I guess this makes no-sense anyway, because there's no
>> point in sending stuff through Cocoon that doesn't need to go that way].
>
>The sitemap spec. has introduced the <map:read> element to pass throught
>resources as they are. Read the xdocs/drafts/sitemap-working-draft.xmap
Thanks for the reply.
I've looked at the sitemap-working-draft.xmap file, and I have tried
to use it in my cocoon setup, but there's a lot of confusion around
here:
1. The working example cocoon setup provided with the sample pages
does not conform to the sitemap-working-draft.xmap format at all.
2. The sitemap-working-draft.xmap file doesn't work in its place at
all, even after you remove the example extras and tidy up the odd
typo which prevents it from being proper XML.
3. If you try to place the <read> tag into the normal process tag of
the old style file it doesn't work.
Now, I appreciate this is pre-release, so I'm not looking for anyone
to give any long explanations - I can work most things out from
working examples. As far as I can put two-and-two together, the
whole sitemap thing is currently in a major stage of transition and
is possibly broken / not working yet. The sitemap-working-draft.xmap
file shows how it should be, and the file in the samples, shows how
it was.
I'm I on the right track - is there anywhere I can look that will
show a current working example, or is there a date in the past that I
can use to checkout a previous version of Cocoon 2 prior to the newer
changes coming into effect.
Finally, I've joined cocoon-dev, which is probably where I should be now!
Thanks again,
Stuart.
--
---------------------------------------------------------------------------
Stuart Roebuck, Managing Director, ADOLOS
Tel. 0131 228 4853 Fax. 0870 054 8322 http://www.adolos.com
Pager 07654 588 898 (100 char alphanumeric)
For secure communication use my personal PGP Public Key:
PGP Fingerprint - 801F 1FBD D568 98AA A90D CEB2 6CEF 046B 23BA FAC9
Re: [Q][Cocoon 2] sitemap / web.xml and letting images through
Posted by Giacomo Pati <Gi...@pwr.ch>.
Stuart Roebuck wrote:
>
> I've just installed Cocoon 2 (appreciating that this is pre-release stuff)
> - MacOS X, Tomcat 3.1 - I've been using Cocoon 1 for some time now under
> Apache and/or Tomcat with no problems.
>
> I set up my web.xml file to pass everything to Cocoon2 e.g.
>
> <servlet-mapping>
> <servlet-name>Cocoon2</servlet-name>
> <url-pattern>/</url-pattern>
> </servlet-mapping>
>
> but then I have problems with my graphic files which are within the site -
> Cocoon tries to process them. As far as I know there is no option in the
> Cocoon2 sitemap syntax to specify that certain URIs should just
> 'pass-through'. [I guess this makes no-sense anyway, because there's no
> point in sending stuff through Cocoon that doesn't need to go that way].
The sitemap spec. has introduced the <map:read> element to pass throught
resources as they are. Read the xdocs/drafts/sitemap-working-draft.xmap
Giacomo
--
PWR GmbH, Organisation & Entwicklung Tel: +41 (0)1 856 2202
Giacomo Pati, CTO/CEO Fax: +41 (0)1 856 2201
Hintereichenstrasse 7 Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen Web: http://www.pwr.ch