get Tomcat real path

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

get Tomcat real path

Zsolt Czinkos-2
Hello

Is it possible to get the real absolute path of Tomcat in an XPL?

It is Orbeon 3.5.1.

Request tree doesn't contain the path-translated element.

It would be OK if  I can access this from a processor class.

Thanks in advance

zsolt


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

Hank Ratzesberger

Back from traveling, I may have missed the answer
to this.  I can only think of using a custom
Java processor to call ServletContext.getContextPath(),
in a Scope Generator/Serializer.

Did I miss another answer?

(a little help, I hope)

--Hank


On Nov 22, 2007, at 3:41 AM, Zsolt Czinkos wrote:

> Hello
>
> Is it possible to get the real absolute path of Tomcat in an XPL?
>
> It is Orbeon 3.5.1.
>
> Request tree doesn't contain the path-translated element.
>
> It would be OK if  I can access this from a processor class.
>
> Thanks in advance
>
> zsolt
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

Erik Bruchez
Administrator
I don't think anybody else has responded on this.

With the servlet API, you can't really know the path of Tomcat AFAIK.  
But you can use the getRealPath() method to obtain the path of a  
particular resource, if that resource is served by Tomcat. In Java  
code called from XPL, you can call the corresponding method on  
ExternalContext.getRealPath():

   ExternalContext externalContext
     = (ExternalContext)  
context.getAttribute(PipelineContext.EXTERNAL_CONTEXT);
   String realPath = externalContext.getRealPath("WEB-INF");

Note that this is not guaranteed to work, and the servlet API may  
return null.

-Erik

On Nov 25, 2007, at 11:58 AM, Hank Ratzesberger wrote:

>
> Back from traveling, I may have missed the answer
> to this.  I can only think of using a custom
> Java processor to call ServletContext.getContextPath(),
> in a Scope Generator/Serializer.
>
> Did I miss another answer?
>
> (a little help, I hope)
>
> --Hank
>
>
> On Nov 22, 2007, at 3:41 AM, Zsolt Czinkos wrote:
>
>> Hello
>>
>> Is it possible to get the real absolute path of Tomcat in an XPL?
>>
>> It is Orbeon 3.5.1.
>>
>> Request tree doesn't contain the path-translated element.
>>
>> It would be OK if  I can access this from a processor class.
>>
>> Thanks in advance
>>
>> zsolt
>>
>> --
>> You receive this message as a subscriber of the [hidden email]  
>> mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>
> Hank Ratzesberger
> NEES@UCSB
> Institute for Crustal Studies,
> University of California, Santa Barbara
> 805-893-8042
>
>
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

StephR
Hi Erik,

I still suck big time in XPL pipelining ... but I have to admit it's a pain to have the following :

p:processor name="oxf:file-serializer">
        <p:input name="config">
            <config>
                <file>projects-involvement.xml</file>
                <directory>C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\mepia4\WEB-INF\resources\apps\profile</directory>
            </config>
   
Couldn't we write the path in an file, and import it ? At least if something changes, there is only one place to change it ?


Steph



Erik Bruchez a écrit :
I don't think anybody else has responded on this.

With the servlet API, you can't really know the path of Tomcat AFAIK. But you can use the getRealPath() method to obtain the path of a particular resource, if that resource is served by Tomcat. In Java code called from XPL, you can call the corresponding method on ExternalContext.getRealPath():

  ExternalContext externalContext
    = (ExternalContext) context.getAttribute(PipelineContext.EXTERNAL_CONTEXT);
  String realPath = externalContext.getRealPath("WEB-INF");

Note that this is not guaranteed to work, and the servlet API may return null.

-Erik

On Nov 25, 2007, at 11:58 AM, Hank Ratzesberger wrote:


Back from traveling, I may have missed the answer
to this.  I can only think of using a custom
Java processor to call ServletContext.getContextPath(),
in a Scope Generator/Serializer.

Did I miss another answer?

(a little help, I hope)

--Hank


On Nov 22, 2007, at 3:41 AM, Zsolt Czinkos wrote:

Hello

Is it possible to get the real absolute path of Tomcat in an XPL?

It is Orbeon 3.5.1.

Request tree doesn't contain the path-translated element.

It would be OK if  I can access this from a processor class.

Thanks in advance

zsolt

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042






--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

fl.schmitt
Hi,

2007/11/28, Stephane Ruchet <[hidden email]>:

p:processor name="oxf:file-serializer">
        <p:input name="config">
            <config>
                <file>projects-involvement.xml</file>
                <directory>C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\mepia4\WEB-INF\resources\apps\profile</directory>
            </config>
   
Couldn't we write the path in an file, and import it ? At least if something changes, there is only one place to change it ?


I think you can "externalize" the config as it's possible in other cases:
- create a file-serializer-config.xml file containing the configuration: <config>...</config>
- add a href attribute to the p:input: <p:input name="config" href="file-serializer-config.xml" />

If the directory is inside the orbeon webapp, AFAIK you don't have to use the absolute path; i suppose you could use <directory>/apps/profile</directory>


HTH
florian



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

StephR
Hi Florian,

Thanks for the quick response.

1) It is said here (http://www.orbeon.com/ops/doc/processors-serializers#file-serializer) that the directory must be an absolute path. I tried "/apps/profile" and it didn't work
2) Externalize the config is a good idea. But : depending on what you are doing, you might want to serialize to an other file or in an other directory. I think it's really strange that we can't save to a relative path! Or am I missing something ?

Steph



Florian Schmitt a écrit :
Hi,

2007/11/28, Stephane Ruchet <[hidden email]>:

p:processor name="oxf:file-serializer">
        <p:input name="config">
            <config>
                <file>projects-involvement.xml</file>
                <directory>C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\mepia4\WEB-INF\resources\apps\profile</directory>
            </config>
   
Couldn't we write the path in an file, and import it ? At least if something changes, there is only one place to change it ?


I think you can "externalize" the config as it's possible in other cases:
- create a file-serializer-config.xml file containing the configuration: <config>...</config>
- add a href attribute to the p:input: <p:input name="config" href="file-serializer-config.xml" />

If the directory is inside the orbeon webapp, AFAIK you don't have to use the absolute path; i suppose you could use <directory>/apps/profile</directory>


HTH
florian



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

fl.schmitt
Hi Stephane,

2007/11/28, Stephane Ruchet <[hidden email]>:

1) It is said here (<a href="http://www.orbeon.com/ops/doc/processors-serializers#file-serializer" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.orbeon.com/ops/doc/processors-serializers#file-serializer ) that the directory must be an absolute path. I tried "/apps/profile" and it didn't work

oh, sorry, you're right, my mistake.  A directory has to be in fact  absolute.

2) Externalize the config is a good idea. But : depending on what you are doing, you might want to serialize to an other file or in an other directory. I think it's really strange that we can't save to a relative path! Or am I missing something ?

You could use the relative path in the file element: <file>/apps/profile/ projects-involvement.xml</file> . Then you don't need the directory at all. Maybe this works.

HTH
florian




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

Erik Bruchez
Administrator
Or, you can use oxf:url-serializer, with an "oxf:/..." path. This will  
write to your resources, is that is possible. This is meant to be  
usable when at least one resource manager is the File resource manager  
or the "WebApp" resource manager (depending on your servlet container).

   http://www.orbeon.com/ops/doc/processors-serializers#url-serializer

-Erik

On Nov 28, 2007, at 4:08 AM, Florian Schmitt wrote:

> Hi Stephane,
>
> 2007/11/28, Stephane Ruchet <[hidden email]>:
>
> 1) It is said here (http://www.orbeon.com/ops/doc/processors-serializers#file-serializer 
>  ) that the directory must be an absolute path. I tried "/apps/
> profile" and it didn't work
>
> oh, sorry, you're right, my mistake.  A directory has to be in fact  
> absolute.
>
> 2) Externalize the config is a good idea. But : depending on what  
> you are doing, you might want to serialize to an other file or in an  
> other directory. I think it's really strange that we can't save to a  
> relative path! Or am I missing something ?
>
> You could use the relative path in the file element: <file>/apps/
> profile/ projects-involvement.xml</file> . Then you don't need the  
> directory at all. Maybe this works.
>
> HTH
> florian
>
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

StephR
Didn't understand a word you wrote :)

But I did check your link... stupid of me, I read it already before but I didn't think it was what I wanted.

But if I use the url-serializer, it will print &lt; , &gt; in the file... a way to omit this ?

The most important question : if the url-serializer can write in a file, what does file-serializer have more ? Performance ?

Thanks for the help, as usual.

Steph



Erik Bruchez a écrit :
Or, you can use oxf:url-serializer, with an "oxf:/..." path. This will write to your resources, is that is possible. This is meant to be usable when at least one resource manager is the File resource manager or the "WebApp" resource manager (depending on your servlet container).

  http://www.orbeon.com/ops/doc/processors-serializers#url-serializer

-Erik

On Nov 28, 2007, at 4:08 AM, Florian Schmitt wrote:

Hi Stephane,

2007/11/28, Stephane Ruchet [hidden email]:

1) It is said here (http://www.orbeon.com/ops/doc/processors-serializers#file-serializer ) that the directory must be an absolute path. I tried "/apps/profile" and it didn't work

oh, sorry, you're right, my mistake.  A directory has to be in fact  absolute.

2) Externalize the config is a good idea. But : depending on what you are doing, you might want to serialize to an other file or in an other directory. I think it's really strange that we can't save to a relative path! Or am I missing something ?

You could use the relative path in the file element: <file>/apps/profile/ projects-involvement.xml</file> . Then you don't need the directory at all. Maybe this works.

HTH
florian



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

Erik Bruchez
Administrator
Do you use oxf:xml-converter before oxf:url-serialier? If so, try  
removing that step.

oxf:url-serializer really should replace oxf:file-serializer in the  
future: if you can write to a URL, you can write to a file.

At the moment, oxf:url-serializer is not as smart as oxf:file-
serializer. It is just able to take an plain XML document and write  
it. It doesn't have any configuration of any kind and it is not able,  
like the other serializers, to take an embedded binary or text  
document as input.

-Erik

On Nov 28, 2007, at 11:28 AM, Stephane Ruchet wrote:

> Didn't understand a word you wrote :)
>
> But I did check your link... stupid of me, I read it already before  
> but I didn't think it was what I wanted.
>
> But if I use the url-serializer, it will print &lt; , &gt; in the  
> file... a way to omit this ?
>
> The most important question : if the url-serializer can write in a  
> file, what does file-serializer have more ? Performance ?
>
> Thanks for the help, as usual.
>
> Steph
>
>
>
> Erik Bruchez a écrit :
>>
>> Or, you can use oxf:url-serializer, with an "oxf:/..." path. This  
>> will write to your resources, is that is possible. This is meant to  
>> be usable when at least one resource manager is the File resource  
>> manager or the "WebApp" resource manager (depending on your servlet  
>> container).
>>
>>   http://www.orbeon.com/ops/doc/processors-serializers#url-serializer
>>
>> -Erik
>>
>> On Nov 28, 2007, at 4:08 AM, Florian Schmitt wrote:
>>
>>> Hi Stephane,
>>>
>>> 2007/11/28, Stephane Ruchet <[hidden email]>:
>>>
>>> 1) It is said here (http://www.orbeon.com/ops/doc/processors-serializers#file-serializer 
>>>  ) that the directory must be an absolute path. I tried "/apps/
>>> profile" and it didn't work
>>>
>>> oh, sorry, you're right, my mistake.  A directory has to be in  
>>> fact  absolute.
>>>
>>> 2) Externalize the config is a good idea. But : depending on what  
>>> you are doing, you might want to serialize to an other file or in  
>>> an other directory. I think it's really strange that we can't save  
>>> to a relative path! Or am I missing something ?
>>>
>>> You could use the relative path in the file element: <file>/apps/
>>> profile/ projects-involvement.xml</file> . Then you don't need the  
>>> directory at all. Maybe this works.
>>>
>>> HTH
>>> florian
>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email]  
>>> mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

StephR
Thanks for the info!

Yes I was using the xml-converter before. I omitted it and it did what you said. Unfortunately now everything is written on one line, but heck, that will do unless if you know how to change this ;)!

Steph



Erik Bruchez a écrit :
Do you use oxf:xml-converter before oxf:url-serialier? If so, try removing that step.

oxf:url-serializer really should replace oxf:file-serializer in the future: if you can write to a URL, you can write to a file.

At the moment, oxf:url-serializer is not as smart as oxf:file-serializer. It is just able to take an plain XML document and write it. It doesn't have any configuration of any kind and it is not able, like the other serializers, to take an embedded binary or text document as input.

-Erik

On Nov 28, 2007, at 11:28 AM, Stephane Ruchet wrote:

Didn't understand a word you wrote :)

But I did check your link... stupid of me, I read it already before but I didn't think it was what I wanted.

But if I use the url-serializer, it will print &lt; , &gt; in the file... a way to omit this ?

The most important question : if the url-serializer can write in a file, what does file-serializer have more ? Performance ?

Thanks for the help, as usual.

Steph



Erik Bruchez a écrit :

Or, you can use oxf:url-serializer, with an "oxf:/..." path. This will write to your resources, is that is possible. This is meant to be usable when at least one resource manager is the File resource manager or the "WebApp" resource manager (depending on your servlet container).

  http://www.orbeon.com/ops/doc/processors-serializers#url-serializer

-Erik

On Nov 28, 2007, at 4:08 AM, Florian Schmitt wrote:

Hi Stephane,

2007/11/28, Stephane Ruchet [hidden email]:

1) It is said here (http://www.orbeon.com/ops/doc/processors-serializers#file-serializer ) that the directory must be an absolute path. I tried "/apps/profile" and it didn't work

oh, sorry, you're right, my mistake.  A directory has to be in fact  absolute.

2) Externalize the config is a good idea. But : depending on what you are doing, you might want to serialize to an other file or in an other directory. I think it's really strange that we can't save to a relative path! Or am I missing something ?

You could use the relative path in the file element: <file>/apps/profile/ projects-involvement.xml</file> . Then you don't need the directory at all. Maybe this works.

HTH
florian



-- 
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

-- 
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

StephR
In reply to this post by Erik Bruchez
Actually none of two really suits me :)!!!

One can write in the directory where we are but writes everything on one line, the other needs an absolute path :(

To come back to file-serializer, and following Florian advice :

    <config>
      <file>projects-involvement.xml</file>
    </config>


will write in Tomcat's directory!


    <config>
      <file>/projects-involvement.xml</file>
    </config>

   
will write at the root of the harddrive.

So now I do the following :


    <config>
      <file>webapps\mepia4\WEB-INF\resources\apps\profile\projects-involvement.xml</file>
    </config>


So at least now I don't have a problem if I'm on a computer where tomcat is installed elsewhere...but it really be nice to be able to write starting from resources ... and not tomcat.

++




Erik Bruchez a écrit :
Do you use oxf:xml-converter before oxf:url-serialier? If so, try removing that step.

oxf:url-serializer really should replace oxf:file-serializer in the future: if you can write to a URL, you can write to a file.

At the moment, oxf:url-serializer is not as smart as oxf:file-serializer. It is just able to take an plain XML document and write it. It doesn't have any configuration of any kind and it is not able, like the other serializers, to take an embedded binary or text document as input.

-Erik

On Nov 28, 2007, at 11:28 AM, Stephane Ruchet wrote:

Didn't understand a word you wrote :)

But I did check your link... stupid of me, I read it already before but I didn't think it was what I wanted.

But if I use the url-serializer, it will print &lt; , &gt; in the file... a way to omit this ?

The most important question : if the url-serializer can write in a file, what does file-serializer have more ? Performance ?

Thanks for the help, as usual.

Steph



Erik Bruchez a écrit :

Or, you can use oxf:url-serializer, with an "oxf:/..." path. This will write to your resources, is that is possible. This is meant to be usable when at least one resource manager is the File resource manager or the "WebApp" resource manager (depending on your servlet container).

  http://www.orbeon.com/ops/doc/processors-serializers#url-serializer

-Erik

On Nov 28, 2007, at 4:08 AM, Florian Schmitt wrote:

Hi Stephane,

2007/11/28, Stephane Ruchet [hidden email]:

1) It is said here (http://www.orbeon.com/ops/doc/processors-serializers#file-serializer ) that the directory must be an absolute path. I tried "/apps/profile" and it didn't work

oh, sorry, you're right, my mistake.  A directory has to be in fact  absolute.

2) Externalize the config is a good idea. But : depending on what you are doing, you might want to serialize to an other file or in an other directory. I think it's really strange that we can't save to a relative path! Or am I missing something ?

You could use the relative path in the file element: <file>/apps/profile/ projects-involvement.xml</file> . Then you don't need the directory at all. Maybe this works.

HTH
florian



-- 
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

-- 
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: get Tomcat real path

Erik Bruchez
Administrator
Plus, the fact that it writes to the Tomcat directory is dependent on  
the Java VM's current working directory, which could change if  
somebody changes the way your Tomcat is started.

The best solution would be to fix oxf:url-serializer to work like  
oxf:file-serializer.

-Erik

On Nov 29, 2007, at 8:25 AM, Stephane Ruchet wrote:

> Actually none of two really suits me :)!!!
>
> One can write in the directory where we are but writes everything on  
> one line, the other needs an absolute path :(
>
> To come back to file-serializer, and following Florian advice :
>
>     <config>
>       <file>projects-involvement.xml</file>
>     </config>
>
> will write in Tomcat's directory!
>
>     <config>
>       <file>/projects-involvement.xml</file>
>     </config>
>
> will write at the root of the harddrive.
>
> So now I do the following :
>
>     <config>
>       <file>webapps\mepia4\WEB-INF\resources\apps\profile\projects-
> involvement.xml</file>
>     </config>
>
> So at least now I don't have a problem if I'm on a computer where  
> tomcat is installed elsewhere...but it really be nice to be able to  
> write starting from resources ... and not tomcat.
>
> ++
>
>
>
> Erik Bruchez a écrit :
>>
>> Do you use oxf:xml-converter before oxf:url-serialier? If so, try  
>> removing that step.
>>
>> oxf:url-serializer really should replace oxf:file-serializer in the  
>> future: if you can write to a URL, you can write to a file.
>>
>> At the moment, oxf:url-serializer is not as smart as oxf:file-
>> serializer. It is just able to take an plain XML document and write  
>> it. It doesn't have any configuration of any kind and it is not  
>> able, like the other serializers, to take an embedded binary or  
>> text document as input.
>>
>> -Erik
>>
>> On Nov 28, 2007, at 11:28 AM, Stephane Ruchet wrote:
>>
>>> Didn't understand a word you wrote :)
>>>
>>> But I did check your link... stupid of me, I read it already  
>>> before but I didn't think it was what I wanted.
>>>
>>> But if I use the url-serializer, it will print &lt; , &gt; in the  
>>> file... a way to omit this ?
>>>
>>> The most important question : if the url-serializer can write in a  
>>> file, what does file-serializer have more ? Performance ?
>>>
>>> Thanks for the help, as usual.
>>>
>>> Steph
>>>
>>>
>>>
>>> Erik Bruchez a écrit :
>>>>
>>>> Or, you can use oxf:url-serializer, with an "oxf:/..." path. This  
>>>> will write to your resources, is that is possible. This is meant  
>>>> to be usable when at least one resource manager is the File  
>>>> resource manager or the "WebApp" resource manager (depending on  
>>>> your servlet container).
>>>>
>>>>   http://www.orbeon.com/ops/doc/processors-serializers#url-serializer
>>>>
>>>> -Erik
>>>>
>>>> On Nov 28, 2007, at 4:08 AM, Florian Schmitt wrote:
>>>>
>>>>> Hi Stephane,
>>>>>
>>>>> 2007/11/28, Stephane Ruchet <[hidden email]>:
>>>>>
>>>>> 1) It is said here (http://www.orbeon.com/ops/doc/processors-serializers#file-serializer 
>>>>>  ) that the directory must be an absolute path. I tried "/apps/
>>>>> profile" and it didn't work
>>>>>
>>>>> oh, sorry, you're right, my mistake.  A directory has to be in  
>>>>> fact  absolute.
>>>>>
>>>>> 2) Externalize the config is a good idea. But : depending on  
>>>>> what you are doing, you might want to serialize to an other file  
>>>>> or in an other directory. I think it's really strange that we  
>>>>> can't save to a relative path! Or am I missing something ?
>>>>>
>>>>> You could use the relative path in the file element: <file>/apps/
>>>>> profile/ projects-involvement.xml</file> . Then you don't need  
>>>>> the directory at all. Maybe this works.
>>>>>
>>>>> HTH
>>>>> florian
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> You receive this message as a subscriber of the ops-
>>>>> [hidden email] mailing list.
>>>>> To unsubscribe: mailto:[hidden email]
>>>>> For general help: mailto:[hidden email]?subject=help
>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>
>>>> --
>>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>>>> http://www.orbeon.com/
>>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email]  
>>> mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws