Martin T Dengler wrote:

> Craig R. McClanahan wrote:
>
> > That was exactly the original thinking -- create a servlet that would be able
> > to execute external applications in conformance with the CGI spec requirements
> > (principally related to environment variables, and connecting standard input
> > and output of the application program to the request and response streams
> > appropriately.
>
> Excellent.  I suppose the right thing to do now is propose a design to
> this list with specification references for review.  If that is too
> heavyweight I can just run the code by somebody (you, Craig?) after
> testing on my own Catalina build.
>

The details of offering code to be included are covered on the Jakarta web site

    http://jakarta.apache.org/site/getinvolved.html

but basically, you'll post the code itself (in a zip file or something) to the
TOMCAT-DEV list so that we can all look at it and comment.  Once the committers are
OK with it, one of us will check it in.

>
> > Having this functionality implemented as a servlet means that you can map it to
> > a directory path ("/cgi-bin/*") and/or a filename extension ("*.cgi"), in the
> > same way that you would do so in a web server.  Or, in a security conscious
> > environment, you could just remove the mappings to make CGI service
> > unavailable.
>
> Exactly, and I suppose the directory path w/could obviously be web
> app-specific, giving the normal encapsulation benefits.

It would pretty much have to be, because that's the only way your servlet would ever
get invoked.

>
> Would there be any scope for extra web-app-related information being
> available in the spawned-process' environment, so it (the CGI) could
> figure out the context path, etc.?
>

I would tend to start with all the standard CGI spec environment variables, so that
the CGI scripts you invoke can remain portable.  CGI doesn't really have the concept
of a "context path", but there are probably sufficient variables (like DOCUMENT_ROOT)
to accomplish what you would be after.

>
> > That would be great!  I will sign you up for that item.
>
> Thanks, I look forward to helping out; if I do something wrong please
> let me know.
>
> >
> > Craig McClanahan
> >
>
> Chrs,
> Martin
>

Craig



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to