You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Yves Vindevogel <yv...@implements.be> on 2003/11/18 01:53:21 UTC

Cocoon and interaction with the Shell

Is there anything within Cocoon that interacts with the (*nix)-shell ?
Or a way to do this ?

Yves Vindevogel
Implements

Kempische Steenweg 206 - 3500 Hasselt - Belgium
Tel+Fax: +32-11-43.55.76  Mobile: +32-478-80.82.91
yves.vindevogel@implements.be - www.implements.be


First they ignore you. Then they laugh at you. Then they fight you. Then you
win.
Mahatma Ghandi.


RE: Cocoon and interaction with the Shell

Posted by Yves Vindevogel <yv...@implements.be>.
I was answering a mail from Upayavira.  Saying this would be nice to have.
It's not about re-inventing the wheel.  It's about including shell commands
in Cocoon.
Commands like "delete this file", but maybe also stuff like "stop deamon",
"copy file", ...



No, there isn't, but I think it would be extremely useful to have
something. Ideally something that XMLizes a unix pipe (but also works on
Windows).

Thoughts?

Regards, Upayavira

-----Original Message-----
From: Simon Mieth [mailto:simon.mieth@t-online.de]
Sent: dinsdag 18 november 2003 13:07
To: users@cocoon.apache.org
Subject: Re: Cocoon and interaction with the Shell


On Tue, 18 Nov 2003 12:10:15 +0100
"Yves Vindevogel" <yv...@implements.be> wrote:

> I agree that it something very useful.
>
> I think, but I'm not an export, that we need something like this:
> An XSP, with parameter "target-platform" for Linux / Windows choice.
> The XSP should be able to do this, eg.
>
> <xsp-shell:execute-command>rm -f <xsp-request:get-parameter
> name="file"</xsp-shell:execute>
> (platform dependant but flexible)
>
> OR
>
> <xsp-shell:delete-file><xsp-request:get parameter
> name="file"><xsp-shell:delete-file>
> (this would be platform independant, but limited to a number of methods)
>

Hi,

could File file = new File(name);
file.delete(); //platform independend

from java.io.File not do this job, or i'm misunderstandig you?

Regards,
Simon

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



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


Re: Cocoon and interaction with the Shell

Posted by Simon Mieth <si...@t-online.de>.
On Tue, 18 Nov 2003 12:10:15 +0100
"Yves Vindevogel" <yv...@implements.be> wrote:

> I agree that it something very useful.
> 
> I think, but I'm not an export, that we need something like this:
> An XSP, with parameter "target-platform" for Linux / Windows choice.
> The XSP should be able to do this, eg.
> 
> <xsp-shell:execute-command>rm -f <xsp-request:get-parameter
> name="file"</xsp-shell:execute>
> (platform dependant but flexible)
> 
> OR
> 
> <xsp-shell:delete-file><xsp-request:get parameter
> name="file"><xsp-shell:delete-file>
> (this would be platform independant, but limited to a number of methods)
> 

Hi,

could File file = new File(name);
file.delete(); //platform independend

from java.io.File not do this job, or i'm misunderstandig you?

Regards,
Simon

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


Re: Cocoon and interaction with the Shell

Posted by Martin Holz <ho...@fiz-chemie.de>.
Upayavira <uv...@upaya.co.uk> writes:

> Yves Vindevogel wrote:
> 
> > Is there anything within Cocoon that interacts with the (*nix)-shell ?
> > Or a way to do this ?
> >  *Yves Vindevogel*

> 
> No, there isn't, but I think it would be extremely useful to have
> something. Ideally something that XMLizes a unix pipe (but also works
> on Windows).

But what kind of XML do you want to produce? Unless the called
program produces XML, it depends on the application.
Btw. the FileSource should work with named pipes out of the
box. But did not test this.


Martin
 


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


Re: Cocoon and interaction with the Shell

Posted by Upayavira <uv...@upaya.co.uk>.
Yves Vindevogel wrote:

>To be honest, I don't know.
>I'm not familiar with the capabilities of Ant.
>I only "use" it for building Cocoon.
>
>-----Original Message-----
>From: alex@OWAL.co.uk [mailto:alex@OWAL.co.uk]
>Sent: dinsdag 18 november 2003 13:39
>To: users@cocoon.apache.org
>Subject: RE: Cocoon and interaction with the Shell
>
>
>yves.vindevogel@implements.be wrote:
>  
>
>><xsp-shell:execute-command>rm -f <xsp-request:get-parameter
>>name="file"</xsp-shell:execute>
>>(platform dependant but flexible)
>>    
>>
>
>If you are creating an XML system for running stuff are you not just
>re-inventing Apache Ant?
>
>Would, say, an Ant file serializer help?
>  
>
There is (I believe in the scratchpad block) an AntBuildGenerator. This 
would be a good place to look for this sort of thing.

I've never tried it, but I'm sure I will one day.

Regards, Upayavira


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


RE: Cocoon and interaction with the Shell

Posted by Yves Vindevogel <yv...@implements.be>.
To be honest, I don't know.
I'm not familiar with the capabilities of Ant.
I only "use" it for building Cocoon.

-----Original Message-----
From: alex@OWAL.co.uk [mailto:alex@OWAL.co.uk]
Sent: dinsdag 18 november 2003 13:39
To: users@cocoon.apache.org
Subject: RE: Cocoon and interaction with the Shell


yves.vindevogel@implements.be wrote:
> <xsp-shell:execute-command>rm -f <xsp-request:get-parameter
> name="file"</xsp-shell:execute>
> (platform dependant but flexible)

If you are creating an XML system for running stuff are you not just
re-inventing Apache Ant?

Would, say, an Ant file serializer help?

Alex




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



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


RE: Cocoon and interaction with the Shell

Posted by al...@OWAL.co.uk.
yves.vindevogel@implements.be wrote:
> <xsp-shell:execute-command>rm -f <xsp-request:get-parameter
> name="file"</xsp-shell:execute>
> (platform dependant but flexible)

If you are creating an XML system for running stuff are you not just re-inventing Apache Ant?

Would, say, an Ant file serializer help?

Alex




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


RE: Cocoon and interaction with the Shell

Posted by Yves Vindevogel <yv...@implements.be>.
I agree that it something very useful.

I think, but I'm not an export, that we need something like this:
An XSP, with parameter "target-platform" for Linux / Windows choice.
The XSP should be able to do this, eg.

<xsp-shell:execute-command>rm -f <xsp-request:get-parameter
name="file"</xsp-shell:execute>
(platform dependant but flexible)

OR

<xsp-shell:delete-file><xsp-request:get parameter
name="file"><xsp-shell:delete-file>
(this would be platform independant, but limited to a number of methods)

BUT
This is what Steven Noels wrote me ...

Yves Vindevogel wrote:

> Is there anything within Cocoon that interacts with the (*nix)-shell ?
> Or a way to do this ?

System.exec() from Java, but evil as hell. Don't!!!

</Steven>
--
Steven Noels                            http://outerthought.org/
Outerthought - Open Source Java & XML            An Orixo Member
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org




-----Original Message-----
From: Upayavira [mailto:uv@upaya.co.uk]
Sent: dinsdag 18 november 2003 11:53
To: users@cocoon.apache.org
Subject: Re: Cocoon and interaction with the Shell


Yves Vindevogel wrote:

> Is there anything within Cocoon that interacts with the (*nix)-shell ?
> Or a way to do this ?
>
> *Yves Vindevogel*
> *Implements*
>
> Kempische Steenweg 206 - 3500 Hasselt - Belgium
> Tel+Fax: +32-11-43.55.76  Mobile: +32-478-80.82.91
> yves.vindevogel@implements.be <ma...@implements.be> -
> www.implements.be <http://www.implements.be/>
>
>
> /First they ignore you. Then they laugh at you. Then they fight you.
> Then you win.
> Mahatma Ghandi.
> /
>

No, there isn't, but I think it would be extremely useful to have
something. Ideally something that XMLizes a unix pipe (but also works on
Windows).

Thoughts?

Regards, Upayavira


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



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


Re: Cocoon and interaction with the Shell

Posted by Upayavira <uv...@upaya.co.uk>.
Yves Vindevogel wrote:

> Is there anything within Cocoon that interacts with the (*nix)-shell ?
> Or a way to do this ?
>  
> *Yves Vindevogel*
> *Implements*
>  
> Kempische Steenweg 206 - 3500 Hasselt - Belgium
> Tel+Fax: +32-11-43.55.76  Mobile: +32-478-80.82.91
> yves.vindevogel@implements.be <ma...@implements.be> - 
> www.implements.be <http://www.implements.be/>
>  
>  
> /First they ignore you. Then they laugh at you. Then they fight you. 
> Then you win.
> Mahatma Ghandi.
> /
>  

No, there isn't, but I think it would be extremely useful to have 
something. Ideally something that XMLizes a unix pipe (but also works on 
Windows).

Thoughts?

Regards, Upayavira


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


RE: Cocoon and interaction with the Shell

Posted by Yves Vindevogel <yv...@implements.be>.
What I need is this:

A link in a page performs a delete in the database of the necesarry records.
Some of these records are references to links to files (for photos on a
website)
I also need to delete the photos on the site.

I would thus need something in XSP to delete a file, or do it from a
function in Postgres.

-----Original Message-----
From: news [mailto:news@sea.gmane.org]On Behalf Of Martin Holz
Sent: dinsdag 18 november 2003 9:21
To: users@cocoon.apache.org
Subject: Re: Cocoon and interaction with the Shell


"Yves Vindevogel" <yv...@implements.be> writes:

> Is there anything within Cocoon that interacts with the (*nix)-shell ?
>
> Or a way to do this ?

What do you mean by interact? Every java program could call
System.Runtime.exec. I am not aware of any cocoon component,
that does this. But it should be straight forward to write
a Generator, that calls a legacy program and converts its
output to SAX events.

Martin


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



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


Re: Cocoon and interaction with the Shell

Posted by Martin Holz <ho...@fiz-chemie.de>.
"Yves Vindevogel" <yv...@implements.be> writes:

> Is there anything within Cocoon that interacts with the (*nix)-shell ?
> 
> Or a way to do this ?
 
What do you mean by interact? Every java program could call
System.Runtime.exec. I am not aware of any cocoon component,
that does this. But it should be straight forward to write
a Generator, that calls a legacy program and converts its 
output to SAX events.

Martin


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