You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ted Byers <r....@gmail.com> on 2008/08/20 23:09:53 UTC

Instructions for setting up CGI

I looked at the page for setting up CGI on Tomcat 6, but the paragraph that
follows leads to some confusion.

"Remove the XML comments from around the CGI servlet and servlet-mapping
configuration in $CATALINA_BASE/conf/web.xml."

Apparently the jar the XML file refers to no longer exists.

And it isn't clear where to put my perl scripts, or if I can place them in,
say, a cgi-bin directory located where all my web apps can access and use
them.

Is there a document providing instructions on how to set up CGI that is both
complete and correct for Tomcat 6?

I would suggest, though, that
"http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html" be ammended to at
least say what parts of the cgi stuff in the xml file can safely be ignored
because it refers to Tomcat 5.x, and describes what is needed for a globally
accessable ci script repository.  I find the combination of the xml file
referring to an old Tomcat with the above mentioned web page confusing.

Thanks

Ted



-- 
View this message in context: http://www.nabble.com/Instructions-for-setting-up-CGI-tp19078111p19078111.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Instructions for setting up CGI

Posted by Mark Thomas <ma...@apache.org>.
Ted Byers wrote:
> Mark,
> 
> OK,  Thanks.  But the information provided isn't quite complete.
> 
> I had done everything the documentation you point to said, and kept getting
> internal server errors until I edited (on the suggestion of a colleague)
> context.xml and changed <Context> to <Context privileged="true">

This is in the 6.0.18 docs but for some reason isn't in the version on
tomcat.a.o. I'll look into that and get the on-line docs updated.

> The documentation you point to is incomplete unless something else was
> causing server errors just at the time I was trying to use my cgi script.
> The file context.xml also needs to be edited (as I describe above), and none
> of the documentation you mention says anything about that.

See above - it looks like the 6.0.18 docs weren't uploaded correctly.

> It is great if this is fixed in 6.0.18, but the online documentation ought
> to say what to do for old versions like 6.0.16 or 6.0.17.

The on-line docs should always be for the current stable release. We
usually note where something has changed since a previous release (eg a new
default etc) but in this case nothing has changed. The errors were in the docs.

> I looked at your change log and found only one bug fix related to CGI, and
> it refers to an NPE.  How that is related to the problem I was facing isn't
> clear to me.

You needed to look a little further. The web.xml fix was in 6.0.17 (never
released).

> Anyway, I still have some digging to do since, although <Context
> privileged="true"> proved sufficient, along with the provided instructions,
> to get my cgi scripts working, I need to find out what other implications it
> has.  Context.xml says it is loaded for each web application, and that is
> troubling since none of my other applications need it.  It has always seemed
> best to me to have programs run with the minimum permissions necessary for
> them to work, but I haven't found as yet how or where I could set privileged
> for one application only.

Again, the docs are your friend. You need a context.xml specifically for
your app.

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

Mark



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Instructions for setting up CGI

Posted by Ted Byers <r....@gmail.com>.
Mark,

OK,  Thanks.  But the information provided isn't quite complete.

I had done everything the documentation you point to said, and kept getting
internal server errors until I edited (on the suggestion of a colleague)
context.xml and changed <Context> to <Context privileged="true">

BTW: I have Tomcat 6.0.16, so I don't know if this was changed in later
releases.

The documentation you point to is incomplete unless something else was
causing server errors just at the time I was trying to use my cgi script.
The file context.xml also needs to be edited (as I describe above), and none
of the documentation you mention says anything about that.

It is great if this is fixed in 6.0.18, but the online documentation ought
to say what to do for old versions like 6.0.16 or 6.0.17.   it is hardly
practicable to upgrade every time a new minor version is released and then
redeploy all your applications.  6.0.18 is what, your second minor release
this year?  While it is nice to see such activity on it, I would be
reluctant to upgrade every time a new minor release comes out unless I am
being hit by an insurmountable bug that has just been fixed.  Your work IS
greatly appreciated, but I just can't take the time to upgrade every few
months.  There is just too much other work I have to do.  Rather, every year
or so I would take a look and see what is new, and upgrade if the benefits
outweigh the cost.

I looked at your change log and found only one bug fix related to CGI, and
it refers to an NPE.  How that is related to the problem I was facing isn't
clear to me.

Anyway, I still have some digging to do since, although <Context
privileged="true"> proved sufficient, along with the provided instructions,
to get my cgi scripts working, I need to find out what other implications it
has.  Context.xml says it is loaded for each web application, and that is
troubling since none of my other applications need it.  It has always seemed
best to me to have programs run with the minimum permissions necessary for
them to work, but I haven't found as yet how or where I could set privileged
for one application only.

Thanks for your work and response.

Ted




Mark Thomas-18 wrote:
> 
> Ted Byers wrote:
>> I looked at the page for setting up CGI on Tomcat 6, but the paragraph
>> that
>> follows leads to some confusion.
>> 
>> "Remove the XML comments from around the CGI servlet and servlet-mapping
>> configuration in $CATALINA_BASE/conf/web.xml."
>> 
>> Apparently the jar the XML file refers to no longer exists.
> 
> You can just ignore any reference to renaming the jar. The rest is the
> same.
> 
>> And it isn't clear where to put my perl scripts, or if I can place them
>> in,
>> say, a cgi-bin directory located where all my web apps can access and use
>> them.
>> 
>> Is there a document providing instructions on how to set up CGI that is
>> both
>> complete and correct for Tomcat 6?
> 
> Yes. The CGI how to. 
> 
>> I would suggest, though, that
>> "http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html" be ammended to
>> at
>> least say what parts of the cgi stuff in the xml file can safely be
>> ignored
>> because it refers to Tomcat 5.x, and describes what is needed for a
>> globally
>> accessable cgi script repository.  I find the combination of the xml file
>> referring to an old Tomcat with the above mentioned web page confusing.
> 
> This has already been fixed. You need 6.0.18 onwards.
> 
> Its even in the change log:
> http://tomcat.apache.org/tomcat-6.0-doc/changelog.html
> 
> Mark
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Instructions-for-setting-up-CGI-tp19078111p19145750.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Instructions for setting up CGI

Posted by Mark Thomas <ma...@apache.org>.
Ted Byers wrote:
> I looked at the page for setting up CGI on Tomcat 6, but the paragraph that
> follows leads to some confusion.
> 
> "Remove the XML comments from around the CGI servlet and servlet-mapping
> configuration in $CATALINA_BASE/conf/web.xml."
> 
> Apparently the jar the XML file refers to no longer exists.

You can just ignore any reference to renaming the jar. The rest is the same.

> And it isn't clear where to put my perl scripts, or if I can place them in,
> say, a cgi-bin directory located where all my web apps can access and use
> them.
> 
> Is there a document providing instructions on how to set up CGI that is both
> complete and correct for Tomcat 6?

Yes. The CGI how to.

> I would suggest, though, that
> "http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html" be ammended to at
> least say what parts of the cgi stuff in the xml file can safely be ignored
> because it refers to Tomcat 5.x, and describes what is needed for a globally
> accessable ci script repository.  I find the combination of the xml file
> referring to an old Tomcat with the above mentioned web page confusing.

This has already been fixed. You need 6.0.18 onwards.

Its even in the change log:
http://tomcat.apache.org/tomcat-6.0-doc/changelog.html

Mark



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org