You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by gv <jg...@yahoo.com> on 2002/08/08 17:01:40 UTC
ScriptAction to run legacy Perl CGI scripts?
Hi,
We have a bunch of old Perl CGI scripts that we would
like to wrap Cocoon around. We plan to change the CGI
output to XML, and have Cocoon XSLT-transform it on
the way out of the pipeline, something like this:
<map:match pattern="app/*">
<map:act type="request">
<map:parameter name="parameters" value="true" />
<map:generate
src="http://www.our-site.com/cgi-bin/{../1}{requestQuery}"
/>
</map:act>
<map:transform ... />
<map:serialize />
</map:match>
However, we'd rather not use HTTP to get the script
output, since the request would have to go through the
web server again -- we'd rather run the script
directly. I'm gathering that we may be able to use a
ScriptAction and run the script using the
BeanScriptingFramework. Can anyone please point me to
more information or a sitemap example of such a
ScriptAction? Or suggest a better way to do this?
Thanks,
John
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: ScriptAction to run legacy Perl CGI scripts?
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: gv [mailto:jgvsh@yahoo.com]
>
> Hi,
>
> We have a bunch of old Perl CGI scripts that we would
> like to wrap Cocoon around. We plan to change the CGI
> output to XML, and have Cocoon XSLT-transform it on
> the way out of the pipeline, something like this:
>
> <map:match pattern="app/*">
> <map:act type="request">
> <map:parameter name="parameters" value="true" />
> <map:generate
> src="http://www.our-site.com/cgi-bin/{../1}{requestQuery}"
> />
> </map:act>
> <map:transform ... />
> <map:serialize />
> </map:match>
>
> However, we'd rather not use HTTP to get the script
> output, since the request would have to go through the
> web server again -- we'd rather run the script
> directly. I'm gathering that we may be able to use a
> ScriptAction and run the script using the
> BeanScriptingFramework. Can anyone please point me to
> more information or a sitemap example of such a
> ScriptAction? Or suggest a better way to do this?
First, you have to find (Java) Perl interpreter to plug it into BSF. Let
me know if you find one, I would love to see such dinosaur.
There are samples of ScriptGenerator, it works similarly to
ScriptAction.
Vadim
> Thanks,
> John
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>