You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lisa Soto <ls...@bnl.gov> on 2004/11/13 00:41:38 UTC
CGI Servlet environmental variables
Hi,
I've read through the documentation, and searched the archives and can't
find a solution to my problem.
We have apache2 with tomcat 4.1.27. When I was using mod_jk, we could
uses aliases under apache with no problems, even with the ROOT of tomcat
mounted on the / of apache.
With JK2, this is not the case, so we're moving content into the tomcat
containers.
The hardest problem is the cgi-bin. I got the CGI Servlet working after
some work, and the scripts execute. But I need for Tomcat to pass a
variable for "DOCUMENT_ROOT" to the perl scripts in the cgi-bin that use
it. Dumping the variables, I can see that it's not doing this.
Is there some way to make this variable available to the perl scripts,
even if I have to set it manually in the environment?
This spans several scripts, so we'd want to set it globally for the
server.
Thanks,
Lisa
--
Lisa Soto
lsoto@bnl.gov
(631) 344-2009
Systems Administrator
ITD Unix Services
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: CGI Servlet environmental variables
Posted by Mark Thomas <ma...@apache.org>.
A couple of options:
1. Any query parameter or POSTed parameter should be passed to the CGI script on
the command line in the form perl arg1=value1 arg2=value2 etc
2. The latest CGI script from CVS (the one in 4.1.31 contains a JDK 1.4
dependency) supports passing enviroment parameters to the CGI script.
> -----Original Message-----
> From: Lisa Soto [mailto:lsoto@bnl.gov]
> Sent: Friday, November 12, 2004 11:42 PM
> To: tomcat-user@jakarta.apache.org
> Subject: CGI Servlet environmental variables
>
> Hi,
>
> I've read through the documentation, and searched the
> archives and can't
> find a solution to my problem.
>
> We have apache2 with tomcat 4.1.27. When I was using mod_jk, we could
> uses aliases under apache with no problems, even with the
> ROOT of tomcat
> mounted on the / of apache.
>
> With JK2, this is not the case, so we're moving content into
> the tomcat
> containers.
>
> The hardest problem is the cgi-bin. I got the CGI Servlet
> working after
> some work, and the scripts execute. But I need for Tomcat to pass a
> variable for "DOCUMENT_ROOT" to the perl scripts in the
> cgi-bin that use
> it. Dumping the variables, I can see that it's not doing this.
>
> Is there some way to make this variable available to the perl scripts,
> even if I have to set it manually in the environment?
>
> This spans several scripts, so we'd want to set it globally for the
> server.
>
> Thanks,
> Lisa
> --
> Lisa Soto
> lsoto@bnl.gov
> (631) 344-2009
> Systems Administrator
> ITD Unix Services
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org