cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carmona Perez, David" <DPerez...@fcc.es>
Subject RE: FOP Serializer configuration
Date Fri, 13 Jun 2003 13:20:03 GMT
Sorry,

It doesn't work, even though baseDir equals ., it doesn't find my images unless I specify
like this;

src=file:///c:/cocoon/images/myImage.gif" instead of src=images/myImage.gif", supposing that
c:\cocoon is the context path.


--------
David

-----Mensaje original-----
De: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
Enviado el: viernes, 13 de junio de 2003 10:08
Para: cocoon-users@xml.apache.org
Asunto: Re: FOP Serializer configuration

You can reach the same without an extra XSP, therefore the context://
protocol exists. It's the way I had it:

<user-config>context://user-config.xml</user-config>

But this is resolved to jndi:/localhost (with Tomcat 4.1) and won't help
you. So I changed it to a relative path (i.e. relative to the sitemap):

<user-config>config/fop/user-config.xml</user-config>

In the user-config.xml, you can set the baseDir to a relative path too
(here relative to the user-config.xml):

<entry>
   <key>baseDir</key>
   <value>.</value>
</entry>

(I used <value>fonts/</value> for the <key>fontBaseDir</key), but I
guess the above should work too.)

Does this work?

Joerg

Carmona Perez, David wrote:
> I'm using Cocoon 2.04 and Tomcat 4.1.
>
> The purpose is very simple, I want to set the baseDir property to the context path.
>
> <?xml version="1.0"?>
> <xsp:page xmlns:xsp="http://apache.org/xsp">
>       <configuration>
>      
>               <!--basedir: donde encontrar imagenes, establecer directorio base el
contexto-->
>               <entry>
>                       <key>baseDir</key>
>                       <value><xsp:expr>context.getRealPath("")</xsp:expr></value>
>               </entry>
>       </configuration>
> </xsp:page>
>
> I know that I can do it in some other ways like adding the context path to every src
of each graphic, but wonder why it doesn't work.
>
>
>
> --------
> David
>
> -----Mensaje original-----
> De: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
> Enviado el: jueves, 12 de junio de 2003 16:55
> Para: cocoon-users@xml.apache.org
> Asunto: Re: FOP Serializer configuration
>
> Shortly after writing this, I had to realize that the servlet context can be
> jndi:/localhost/..., which is not what I want and that has changed between
> Tomcat 4.0 and 4.1 (both in combination with JBoss 3.x).
>
> Changing the <user-config> to cocoon:/ protocol does not work as you already
> have experienced. This I didn't expect, because why should context:// work
> and cocoon:// not. Can you file a bug in bugzilla?
>
> For me simply using a relative path works now, but this won't help you as
> you seem to create the fop-config dynamically. May I ask for the use case?
>
> Joerg
>
> Joerg Heinicke wrote:
>
>>What Cocoon version do you use?
>>
>>I have 2.0.4 and use
>><user-config>context://doc/fop/config.xml</user-config> without any
>>problems.
>>
>>Joerg
>>
>>Carmona Perez, David wrote:
>>
>>
>>>Hi all,
>>>
>>>Alter reading this page:
>>>
>>>http://cocoon.apache.org/2.0/userdocs/serializers/pdf-serializer.html
>>>
>>>I've tried to configure the FOPSerializer with a file generated
>>>through a Cocoon pipeline in this way:
>>>
>>>            <map:serializer logger="sitemap.serializer.fo2pdf"
>>>mime-type="application/pdf" name="pdf"
>>>                src="org.apache.cocoon.serialization.FOPSerializer">
>>>                <user-config>cocoon:/config-fop.xsp</user-config>
>>>            </map:serializer>
>>>
>>>I can access cocoon:/config-fop.xsp well, but the FOPSerializer class
>>>tries to open:
>>>
>>>file://myContextPath/cocoon:/config-fop.xsp
>>>
>>>Does anyone know the cause?
>>>
>>>--------
>>>David


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

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


Mime
View raw message