RE: CGI environment vars

2003-02-05 Thread Sean Dockery
Hello, Colin.

Never mind about this last post.  The whole thread hadn't arrived and I 
hadn't seen your post about you having tried this.

At 13:26 2003-02-05 -0700, you wrote:
So...  You are *exporting* the variable after declaring it?




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




RE: CGI environment vars

2003-02-05 Thread Sean Dockery
Hi, Jim.

Files such as .profile are only executed once--when users login.  Other 
files (such as .bashrc and .cshrc) are run when a new shell process (bash 
or csh/tcsh, respectively) is spawn.  If the machine starts a process 
automatically (through init.d, for example), no login occurs and you aren't 
able to leverage those initialization files.

Good idea, though.  :-)

At 13:39 2003-02-05 -0600, you wrote:
It's been years since I worked with unix (ok, aix).  However I do recall a
file .profile (I think it was in your home directory) which is where we set
our environment vars.  It was executed by the shell when you logged on.
Have you tried this?  If this is way off, please ignore it, I don't need to
be flamed (having a rough day).

Jim


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 1:28 PM
To: Tomcat Users List
Subject: Re: CGI environment vars

I haven;t seen this discussed yet, you are exporting your variables in
setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?

Example:

export WACKY=very

or

ANSWER=42
exp-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




RE: CGI environment vars

2003-02-05 Thread Sean Dockery
So...  You are *exporting* the variable after declaring it?

At 13:07 2003-02-05 -0600, you wrote:

Already tried this and it didn't work.  Both in the setenv.sh (checked for
and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
running environment but is not transferred to the CGIServlet's exec
environment.

> -Original Message-
> From: Sean Dockery [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 11:44 AM
> To:   Tomcat Users List
> Subject:  RE: CGI environment vars
>
> What about setting the variable yourself in the catalina.sh script?  If
> that doesn't work, make sure that the variable is exported (so that it
> remains in the super shell when the sub shell exits).  Example:
>
> LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;
>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




RE: CGI environment vars

2003-02-05 Thread PELOQUIN,JEFFREY (HP-Boise,ex1)
the file /etc/profile should contain the default profile and environment
variables for the ksh, if I recall.

-Original Message-
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 12:40 PM
To: 'Tomcat Users List'
Subject: RE: CGI environment vars


It's been years since I worked with unix (ok, aix).  However I do recall a
file .profile (I think it was in your home directory) which is where we set
our environment vars.  It was executed by the shell when you logged on.
Have you tried this?  If this is way off, please ignore it, I don't need to
be flamed (having a rough day).

Jim


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 1:28 PM
To: Tomcat Users List
Subject: Re: CGI environment vars

I haven;t seen this discussed yet, you are exporting your variables in
setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?

Example:

export WACKY=very

or

ANSWER=42
export ANSWER


-Tim


Madere, Colin wrote:
> Already tried this and it didn't work.  Both in the setenv.sh (checked for
> and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
> running environment but is not transferred to the CGIServlet's exec
> environment.
>
>
>>-Original Message-
>>From: Sean Dockery [SMTP:[EMAIL PROTECTED]]
>>Sent: Wednesday, February 05, 2003 11:44 AM
>>To:   Tomcat Users List
>>Subject:  RE: CGI environment vars
>>
>>What about setting the variable yourself in the catalina.sh script?  If
>>that doesn't work, make sure that the variable is exported (so that it
>>remains in the super shell when the sub shell exits).  Example:
>>
>>LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;
>>
>>At 11:23 2003-02-05 -0600, you wrote:
>>
>>>no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's
>>
>>a
>>
>>>servlet set up to handle it already, and the CGI is getting executed but
>>
>>the
>>
>>>logs show that it's getting an error loading ld.so because it can't find
>>
>>it
>>
>>>(which is also the case when trying to run it in a shell without having
>>>LD_LIBRARY_PATH set appropriately).
>>>
>>>
>>>>-Original Message-
>>>>From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
>>>>Sent: Wednesday, February 05, 2003 11:21 AM
>>>>To:   Tomcat Users List
>>>>Subject:  RE: CGI environment vars
>>>>
>>>>how about you do it yourself, I assume that you launch your CGI script
>>>>using Runtime.exec
>>>>in that case, use the method that
>>>>
>>>>http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
>>>>
>>>>take a look at
>>>>
>>>>Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
>>>>
>>>>-Original Message-
>>>>From: Madere, Colin [mailto:[EMAIL PROTECTED]]
>>>>Sent: Wednesday, February 05, 2003 8:44 AM
>>>>To: [EMAIL PROTECTED]
>>>>Subject: CGI environment vars
>>>>
>>>>
>>>>Tomcat 4.1.18 : UMN Mapserver CGI
>>>>
>>>>I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
>>>>libraries to run.  However, I can't seem to get whatever shell that
>>
>>Tomcat
>>
>>>>uses to run CGIs seeded with that variable.
>>>>
>>>>I tried putting it in the "setenv.sh" which is checked for and used in
>>>>catalina.sh, but that doesn't seem to have any effect on CGIs.
>>>>
>>>>Anyone have an idea?
>>>>
>>>>Colin
>>>>
>>>>
>>>>-
>>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>-
>>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>-
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>Sean Dockery
>>[EMAIL PROTECTED]
>>Certified Java Web Component Developer
>>Certified Delphi Programmer
>>SBD Consultants
>>http://www.sbdconsultants.com
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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


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

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




RE: CGI environment vars

2003-02-05 Thread Madere, Colin
Wrapping it in a small script as you described below works.  Means I don't
have to modify the stock CGIServlet either!

Thanks for the suggestions.

> -Original Message-
> From: Tim Funk [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 1:38 PM
> To:   Tomcat Users List
> Subject:  Re: CGI environment vars
> 
> O sweet sweet source code for CGIServlet.java 
> 
> http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/or
> g/apache/catalina/servlets/CGIServlet.java?rev=1.11&content-type=text/vnd.
> viewcvs-markup
> 
> 
> Heres the deal: Look for the method:
> protected boolean setCGIEnvironment(HttpServletRequest req)
> 
> and you'll see the environment be created. This environment is passed to 
> the script. So you are SOL I think.
> 
> But there is hope ... write a wrapper shell script around your real CGI 
> script like this and you might luck out:
> --
> #!/bin/sh
> export CRAP=mycrap
> . /pull/in/some/file
> 
> exec real_cgi_name
> --
> 
> -Tim
> 
> Madere, Colin wrote:
> > Yep.. tried both the sh and csh syntax, no luck.
> > 
> > 
> >>-Original Message-
> >>From:   Tim Funk [SMTP:[EMAIL PROTECTED]]
> >>Sent:   Wednesday, February 05, 2003 1:28 PM
> >>To: Tomcat Users List
> >>Subject:Re: CGI environment vars
> >>
> >>I haven;t seen this discussed yet, you are exporting your variables in 
> >>setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?
> >>
> >>Example:
> >>
> >>export WACKY=very
> >>
> >>or
> >>
> >>ANSWER=42
> >>export ANSWER
> >>
> >>
> >>-Tim
> >>
> >>
> >>Madere, Colin wrote:
> >>
> >>>Already tried this and it didn't work.  Both in the setenv.sh (checked
> >>
> >>for
> >>
> >>>and read by catalina.sh) and startup.sh.  It seems that's for the
> Tomcat
> >>>running environment but is not transferred to the CGIServlet's exec
> >>>environment.
> >>>
> >>>
> >>>
> >>>>-Original Message-
> >>>>From: Sean Dockery [SMTP:[EMAIL PROTECTED]]
> >>>>Sent: Wednesday, February 05, 2003 11:44 AM
> >>>>To:   Tomcat Users List
> >>>>Subject:  RE: CGI environment vars
> >>>>
> >>>>What about setting the variable yourself in the catalina.sh script?
> If 
> >>>>that doesn't work, make sure that the variable is exported (so that it
> 
> >>>>remains in the super shell when the sub shell exits).  Example:
> >>>>
> >>>>LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;
> >>>>
> >>>>At 11:23 2003-02-05 -0600, you wrote:
> >>>>
> >>>>
> >>>>>no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).
> >>
> >>There's
> >>
> >>>>a
> >>>>
> >>>>
> >>>>>servlet set up to handle it already, and the CGI is getting executed
> >>
> >>but
> >>
> >>>>the
> >>>>
> >>>>
> >>>>>logs show that it's getting an error loading ld.so because it can't
> >>
> >>find
> >>
> >>>>it
> >>>>
> >>>>
> >>>>>(which is also the case when trying to run it in a shell without
> having
> >>>>>LD_LIBRARY_PATH set appropriately).
> >>>>>
> >>>>>
> >>>>>
> >>>>>>-Original Message-
> >>>>>>From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
> >>>>>>Sent: Wednesday, February 05, 2003 11:21 AM
> >>>>>>To:   Tomcat Users List
> >>>>>>Subject:  RE: CGI environment vars
> >>>>>>
> >>>>>>how about you do it yourself, I assume that you launch your CGI
> script
> >>>>>>using Runtime.exec
> >>>>>>in that case, use the method that
> >>>>>>
> >>>>>>http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
> >>>>>>
> >>>>>>take a look at
> >>>>>>
> >>>>>>Runtime.exec(java.lang.String,java.lan

RE: CGI environment vars

2003-02-05 Thread Jim Urban
Just an idea:

Extend the CGIServlet (MyCGIServlet) and override the setCGIEnvironment
method (it is protected, so you could call it and then add your variables
which you could read from a properties file or something).  Then modify the
web.xml file found in Tomcat's conf directory to invoke your CGI servlet by
changing the servlet-class attribute of the cgi servlet element
(com.mycomp.servlets.MyCGIServlet).  I don't
see why this wouldn't work.

Jim


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 1:38 PM
To: Tomcat Users List
Subject: Re: CGI environment vars

O sweet sweet source code for CGIServlet.java 

http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/org/
apache/catalina/servlets/CGIServlet.java?rev=1.11&content-type=text/vnd.view
cvs-markup


Heres the deal: Look for the method:
protected boolean setCGIEnvironment(HttpServletRequest req)

and you'll see the environment be created. This environment is passed to
the script. So you are SOL I think.

But there is hope ... write a wrapper shell script around your real CGI
script like this and you might luck out:
--
#!/bin/sh
export CRAP=mycrap
. /pull/in/some/file

exec real_cgi_name
--

-Tim

Madere, Colin wrote:
> Yep.. tried both the sh and csh syntax, no luck.
>
>
>>-Original Message-
>>From: Tim Funk [SMTP:[EMAIL PROTECTED]]
>>Sent: Wednesday, February 05, 2003 1:28 PM
>>To:   Tomcat Users List
>>Subject:  Re: CGI environment vars
>>
>>I haven;t seen this discussed yet, you are exporting your variables in
>>setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?
>>
>>Example:
>>
>>export WACKY=very
>>
>>or
>>
>>ANSWER=42
>>export ANSWER
>>
>>
>>-Tim
>>
>>
>>Madere, Colin wrote:
>>
>>>Already tried this and it didn't work.  Both in the setenv.sh (checked
>>
>>for
>>
>>>and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
>>>running environment but is not transferred to the CGIServlet's exec
>>>environment.
>>>
>>>
>>>
>>>>-Original Message-
>>>>From:   Sean Dockery [SMTP:[EMAIL PROTECTED]]
>>>>Sent:   Wednesday, February 05, 2003 11:44 AM
>>>>To: Tomcat Users List
>>>>Subject:RE: CGI environment vars
>>>>
>>>>What about setting the variable yourself in the catalina.sh script?  If
>>>>that doesn't work, make sure that the variable is exported (so that it
>>>>remains in the super shell when the sub shell exits).  Example:
>>>>
>>>>LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;
>>>>
>>>>At 11:23 2003-02-05 -0600, you wrote:
>>>>
>>>>
>>>>>no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).
>>
>>There's
>>
>>>>a
>>>>
>>>>
>>>>>servlet set up to handle it already, and the CGI is getting executed
>>
>>but
>>
>>>>the
>>>>
>>>>
>>>>>logs show that it's getting an error loading ld.so because it can't
>>
>>find
>>
>>>>it
>>>>
>>>>
>>>>>(which is also the case when trying to run it in a shell without having
>>>>>LD_LIBRARY_PATH set appropriately).
>>>>>
>>>>>
>>>>>
>>>>>>-Original Message-
>>>>>>From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
>>>>>>Sent: Wednesday, February 05, 2003 11:21 AM
>>>>>>To:   Tomcat Users List
>>>>>>Subject:  RE: CGI environment vars
>>>>>>
>>>>>>how about you do it yourself, I assume that you launch your CGI script
>>>>>>using Runtime.exec
>>>>>>in that case, use the method that
>>>>>>
>>>>>>http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
>>>>>>
>>>>>>take a look at
>>>>>>
>>>>>>Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
>>>>>>
>>>>>>-Original Message-
>>>>>>From: Madere, Colin [mailto:[EMAIL PROTECTED]]
>>>>>>Sent: Wednesday, February 05, 2003 8:44 AM
>>>>>>To: [EMAIL PROTECTED]
>>>>>>Subject: CGI environment vars
>>>>

RE: CGI environment vars

2003-02-05 Thread Jim Urban
It's been years since I worked with unix (ok, aix).  However I do recall a
file .profile (I think it was in your home directory) which is where we set
our environment vars.  It was executed by the shell when you logged on.
Have you tried this?  If this is way off, please ignore it, I don't need to
be flamed (having a rough day).

Jim


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 1:28 PM
To: Tomcat Users List
Subject: Re: CGI environment vars

I haven;t seen this discussed yet, you are exporting your variables in
setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?

Example:

export WACKY=very

or

ANSWER=42
export ANSWER


-Tim


Madere, Colin wrote:
> Already tried this and it didn't work.  Both in the setenv.sh (checked for
> and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
> running environment but is not transferred to the CGIServlet's exec
> environment.
>
>
>>-Original Message-
>>From: Sean Dockery [SMTP:[EMAIL PROTECTED]]
>>Sent: Wednesday, February 05, 2003 11:44 AM
>>To:   Tomcat Users List
>>Subject:  RE: CGI environment vars
>>
>>What about setting the variable yourself in the catalina.sh script?  If
>>that doesn't work, make sure that the variable is exported (so that it
>>remains in the super shell when the sub shell exits).  Example:
>>
>>LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;
>>
>>At 11:23 2003-02-05 -0600, you wrote:
>>
>>>no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's
>>
>>a
>>
>>>servlet set up to handle it already, and the CGI is getting executed but
>>
>>the
>>
>>>logs show that it's getting an error loading ld.so because it can't find
>>
>>it
>>
>>>(which is also the case when trying to run it in a shell without having
>>>LD_LIBRARY_PATH set appropriately).
>>>
>>>
>>>>-Original Message-
>>>>From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
>>>>Sent: Wednesday, February 05, 2003 11:21 AM
>>>>To:   Tomcat Users List
>>>>Subject:  RE: CGI environment vars
>>>>
>>>>how about you do it yourself, I assume that you launch your CGI script
>>>>using Runtime.exec
>>>>in that case, use the method that
>>>>
>>>>http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
>>>>
>>>>take a look at
>>>>
>>>>Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
>>>>
>>>>-Original Message-
>>>>From: Madere, Colin [mailto:[EMAIL PROTECTED]]
>>>>Sent: Wednesday, February 05, 2003 8:44 AM
>>>>To: [EMAIL PROTECTED]
>>>>Subject: CGI environment vars
>>>>
>>>>
>>>>Tomcat 4.1.18 : UMN Mapserver CGI
>>>>
>>>>I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
>>>>libraries to run.  However, I can't seem to get whatever shell that
>>
>>Tomcat
>>
>>>>uses to run CGIs seeded with that variable.
>>>>
>>>>I tried putting it in the "setenv.sh" which is checked for and used in
>>>>catalina.sh, but that doesn't seem to have any effect on CGIs.
>>>>
>>>>Anyone have an idea?
>>>>
>>>>Colin
>>>>
>>>>
>>>>-
>>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>-
>>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>-
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>Sean Dockery
>>[EMAIL PROTECTED]
>>Certified Java Web Component Developer
>>Certified Delphi Programmer
>>SBD Consultants
>>http://www.sbdconsultants.com
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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


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




Re: CGI environment vars

2003-02-05 Thread Tim Funk
O sweet sweet source code for CGIServlet.java 

http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?rev=1.11&content-type=text/vnd.viewcvs-markup


Heres the deal: Look for the method:
protected boolean setCGIEnvironment(HttpServletRequest req)

and you'll see the environment be created. This environment is passed to 
the script. So you are SOL I think.

But there is hope ... write a wrapper shell script around your real CGI 
script like this and you might luck out:
--
#!/bin/sh
export CRAP=mycrap
. /pull/in/some/file

exec real_cgi_name
--

-Tim

Madere, Colin wrote:
Yep.. tried both the sh and csh syntax, no luck.



-Original Message-
From:	Tim Funk [SMTP:[EMAIL PROTECTED]]
Sent:	Wednesday, February 05, 2003 1:28 PM
To:	Tomcat Users List
Subject:	Re: CGI environment vars

I haven;t seen this discussed yet, you are exporting your variables in 
setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?

Example:

export WACKY=very

or

ANSWER=42
export ANSWER


-Tim


Madere, Colin wrote:

Already tried this and it didn't work.  Both in the setenv.sh (checked


for


and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
running environment but is not transferred to the CGIServlet's exec
environment.




-Original Message-
From:	Sean Dockery [SMTP:[EMAIL PROTECTED]]
Sent:	Wednesday, February 05, 2003 11:44 AM
To:	Tomcat Users List
Subject:	RE: CGI environment vars

What about setting the variable yourself in the catalina.sh script?  If 
that doesn't work, make sure that the variable is exported (so that it 
remains in the super shell when the sub shell exits).  Example:

LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;

At 11:23 2003-02-05 -0600, you wrote:


no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).


There's


a



servlet set up to handle it already, and the CGI is getting executed


but


the



logs show that it's getting an error loading ld.so because it can't


find


it



(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).




-Original Message-
From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 11:21 AM
To:   Tomcat Users List
Subject:  RE: CGI environment vars

how about you do it yourself, I assume that you launch your CGI script
using Runtime.exec
in that case, use the method that

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html

take a look at

Runtime.exec(java.lang.String,java.lang.String[],java.io.File)

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: CGI environment vars


Tomcat 4.1.18 : UMN Mapserver CGI

I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
libraries to run.  However, I can't seem to get whatever shell that


Tomcat



uses to run CGIs seeded with that variable.

I tried putting it in the "setenv.sh" which is checked for and used in
catalina.sh, but that doesn't seem to have any effect on CGIs.

Anyone have an idea?

Colin


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


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


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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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



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





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



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





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




RE: CGI environment vars

2003-02-05 Thread Madere, Colin
Yep.. tried both the sh and csh syntax, no luck.

> -Original Message-
> From: Tim Funk [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 1:28 PM
> To:   Tomcat Users List
> Subject:  Re: CGI environment vars
> 
> I haven;t seen this discussed yet, you are exporting your variables in 
> setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?
> 
> Example:
> 
> export WACKY=very
> 
> or
> 
> ANSWER=42
> export ANSWER
> 
> 
> -Tim
> 
> 
> Madere, Colin wrote:
> > Already tried this and it didn't work.  Both in the setenv.sh (checked
> for
> > and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
> > running environment but is not transferred to the CGIServlet's exec
> > environment.
> > 
> > 
> >>-Original Message-
> >>From:       Sean Dockery [SMTP:[EMAIL PROTECTED]]
> >>Sent:   Wednesday, February 05, 2003 11:44 AM
> >>To: Tomcat Users List
> >>Subject:RE: CGI environment vars
> >>
> >>What about setting the variable yourself in the catalina.sh script?  If 
> >>that doesn't work, make sure that the variable is exported (so that it 
> >>remains in the super shell when the sub shell exits).  Example:
> >>
> >>LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;
> >>
> >>At 11:23 2003-02-05 -0600, you wrote:
> >>
> >>>no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).
> There's
> >>
> >>a
> >>
> >>>servlet set up to handle it already, and the CGI is getting executed
> but
> >>
> >>the
> >>
> >>>logs show that it's getting an error loading ld.so because it can't
> find
> >>
> >>it
> >>
> >>>(which is also the case when trying to run it in a shell without having
> >>>LD_LIBRARY_PATH set appropriately).
> >>>
> >>>
> >>>>-Original Message-
> >>>>From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
> >>>>Sent: Wednesday, February 05, 2003 11:21 AM
> >>>>To:   Tomcat Users List
> >>>>Subject:  RE: CGI environment vars
> >>>>
> >>>>how about you do it yourself, I assume that you launch your CGI script
> >>>>using Runtime.exec
> >>>>in that case, use the method that
> >>>>
> >>>>http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
> >>>>
> >>>>take a look at
> >>>>
> >>>>Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
> >>>>
> >>>>-Original Message-
> >>>>From: Madere, Colin [mailto:[EMAIL PROTECTED]]
> >>>>Sent: Wednesday, February 05, 2003 8:44 AM
> >>>>To: [EMAIL PROTECTED]
> >>>>Subject: CGI environment vars
> >>>>
> >>>>
> >>>>Tomcat 4.1.18 : UMN Mapserver CGI
> >>>>
> >>>>I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
> >>>>libraries to run.  However, I can't seem to get whatever shell that
> >>
> >>Tomcat
> >>
> >>>>uses to run CGIs seeded with that variable.
> >>>>
> >>>>I tried putting it in the "setenv.sh" which is checked for and used in
> >>>>catalina.sh, but that doesn't seem to have any effect on CGIs.
> >>>>
> >>>>Anyone have an idea?
> >>>>
> >>>>Colin
> >>>>
> >>>>
> >>>>-
> >>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>>
> >>>>
> >>>>-
> >>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>-
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>Sean Dockery
> >>[EMAIL PROTECTED]
> >>Certified Java Web Component Developer
> >>Certified Delphi Programmer
> >>SBD Consultants
> >>http://www.sbdconsultants.com
> >>
> >>
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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




Re: CGI environment vars

2003-02-05 Thread Tim Funk
I haven;t seen this discussed yet, you are exporting your variables in 
setenv.sh AND setenv.sh is located in $CATALINA_HOME/bin?

Example:

export WACKY=very

or

ANSWER=42
export ANSWER


-Tim


Madere, Colin wrote:
Already tried this and it didn't work.  Both in the setenv.sh (checked for
and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
running environment but is not transferred to the CGIServlet's exec
environment.



-Original Message-
From:	Sean Dockery [SMTP:[EMAIL PROTECTED]]
Sent:	Wednesday, February 05, 2003 11:44 AM
To:	Tomcat Users List
Subject:	RE: CGI environment vars

What about setting the variable yourself in the catalina.sh script?  If 
that doesn't work, make sure that the variable is exported (so that it 
remains in the super shell when the sub shell exits).  Example:

LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;

At 11:23 2003-02-05 -0600, you wrote:

no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's


a


servlet set up to handle it already, and the CGI is getting executed but


the


logs show that it's getting an error loading ld.so because it can't find


it


(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).



-Original Message-
From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 11:21 AM
To:   Tomcat Users List
Subject:  RE: CGI environment vars

how about you do it yourself, I assume that you launch your CGI script
using Runtime.exec
in that case, use the method that

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html

take a look at

Runtime.exec(java.lang.String,java.lang.String[],java.io.File)

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: CGI environment vars


Tomcat 4.1.18 : UMN Mapserver CGI

I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
libraries to run.  However, I can't seem to get whatever shell that


Tomcat


uses to run CGIs seeded with that variable.

I tried putting it in the "setenv.sh" which is checked for and used in
catalina.sh, but that doesn't seem to have any effect on CGIs.

Anyone have an idea?

Colin


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


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


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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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



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





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




RE: CGI environment vars

2003-02-05 Thread Madere, Colin
Script isn't written by me, compiled C code.  I'll probably modify the
CGIServlet to include it in the env that execs the script, if possible.
Seems like a better idea than having to modify every CGI or having to modify
every version as I upgrade.

> -Original Message-
> From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 11:36 AM
> To:   Tomcat Users List
> Subject:  RE: CGI environment vars
> 
> Looking at the source code of the CGIServlet, these variables are not set
> anywhere.
> My recommendation would be that you modify this servlet to fit your needs,
> or even easier,
> why don't you just put the LD_LIBRARY_PATH inside your CGI scripts?
> 
> Filip
> 
> -Original Message-
> From: Madere, Colin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 9:23 AM
> To: 'Tomcat Users List'
> Subject: RE: CGI environment vars
> 
> 
> no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
> servlet set up to handle it already, and the CGI is getting executed but
> the
> logs show that it's getting an error loading ld.so because it can't find
> it
> (which is also the case when trying to run it in a shell without having
> LD_LIBRARY_PATH set appropriately).
> 
> > -Original Message-
> > From:       Filip Hanik [SMTP:[EMAIL PROTECTED]]
> > Sent:   Wednesday, February 05, 2003 11:21 AM
> > To: Tomcat Users List
> > Subject:RE: CGI environment vars
> > 
> > how about you do it yourself, I assume that you launch your CGI script
> > using Runtime.exec
> > in that case, use the method that 
> > 
> > http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
> > 
> > take a look at
> > 
> > Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
> > 
> > -Original Message-
> > From: Madere, Colin [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 05, 2003 8:44 AM
> > To: [EMAIL PROTECTED]
> > Subject: CGI environment vars
> > 
> > 
> > Tomcat 4.1.18 : UMN Mapserver CGI
> > 
> > I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
> > libraries to run.  However, I can't seem to get whatever shell that
> Tomcat
> > uses to run CGIs seeded with that variable.
> > 
> > I tried putting it in the "setenv.sh" which is checked for and used in
> > catalina.sh, but that doesn't seem to have any effect on CGIs.
> > 
> > Anyone have an idea?
> > 
> > Colin
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>  << File: ATT343620.txt >> 

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




RE: CGI environment vars

2003-02-05 Thread Madere, Colin
Already tried this and it didn't work.  Both in the setenv.sh (checked for
and read by catalina.sh) and startup.sh.  It seems that's for the Tomcat
running environment but is not transferred to the CGIServlet's exec
environment.

> -Original Message-
> From: Sean Dockery [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 11:44 AM
> To:   Tomcat Users List
> Subject:  RE: CGI environment vars
> 
> What about setting the variable yourself in the catalina.sh script?  If 
> that doesn't work, make sure that the variable is exported (so that it 
> remains in the super shell when the sub shell exits).  Example:
> 
> LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;
> 
> At 11:23 2003-02-05 -0600, you wrote:
> >no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's
> a
> >servlet set up to handle it already, and the CGI is getting executed but
> the
> >logs show that it's getting an error loading ld.so because it can't find
> it
> >(which is also the case when trying to run it in a shell without having
> >LD_LIBRARY_PATH set appropriately).
> >
> > > -Original Message-
> > > From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
> > > Sent: Wednesday, February 05, 2003 11:21 AM
> > > To:   Tomcat Users List
> > > Subject:  RE: CGI environment vars
> > >
> > > how about you do it yourself, I assume that you launch your CGI script
> > > using Runtime.exec
> > > in that case, use the method that
> > >
> > > http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
> > >
> > > take a look at
> > >
> > > Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
> > >
> > > -Original Message-
> > > From: Madere, Colin [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, February 05, 2003 8:44 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: CGI environment vars
> > >
> > >
> > > Tomcat 4.1.18 : UMN Mapserver CGI
> > >
> > > I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
> > > libraries to run.  However, I can't seem to get whatever shell that
> Tomcat
> > > uses to run CGIs seeded with that variable.
> > >
> > > I tried putting it in the "setenv.sh" which is checked for and used in
> > > catalina.sh, but that doesn't seem to have any effect on CGIs.
> > >
> > > Anyone have an idea?
> > >
> > > Colin
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> Sean Dockery
> [EMAIL PROTECTED]
> Certified Java Web Component Developer
> Certified Delphi Programmer
> SBD Consultants
> http://www.sbdconsultants.com
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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




RE: CGI environment vars

2003-02-05 Thread Madere, Colin
I was wondering if there was something of this sort that would work.  I saw
a reference to it.  I'll have to try that, but I think it might be just for
the servlet and not necessarily the env the CGI is executed in.

> -Original Message-
> From: Sean Dockery [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 12:08 PM
> To:   Tomcat Users List
> Subject:  RE: CGI environment vars
> 
> Other possible solution attempts include an  tag in web.xml or
> 
> an  tag in the server.xml.
> 
> At 10:43 2003-02-05 -0700, you wrote:
> >What about setting the variable yourself in the catalina.sh script?  If 
> >that doesn't work, make sure that the variable is exported (so that it 
> >remains in the super shell when the sub shell exits).  Example:
> >
> >LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;
> >
> >At 11:23 2003-02-05 -0600, you wrote:
> >>no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's
> a
> >>servlet set up to handle it already, and the CGI is getting executed but
> the
> >>logs show that it's getting an error loading ld.so because it can't find
> it
> >>(which is also the case when trying to run it in a shell without having
> >>LD_LIBRARY_PATH set appropriately).
> >>
> >> > -----Original Message-----
> >> > From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
> >> > Sent: Wednesday, February 05, 2003 11:21 AM
> >> > To:   Tomcat Users List
> >> > Subject:  RE: CGI environment vars
> >> >
> >> > how about you do it yourself, I assume that you launch your CGI
> script
> >> > using Runtime.exec
> >> > in that case, use the method that
> >> >
> >> > http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
> >> >
> >> > take a look at
> >> >
> >> > Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
> >> >
> >> > -Original Message-
> >> > From: Madere, Colin [mailto:[EMAIL PROTECTED]]
> >> > Sent: Wednesday, February 05, 2003 8:44 AM
> >> > To: [EMAIL PROTECTED]
> >> > Subject: CGI environment vars
> >> >
> >> >
> >> > Tomcat 4.1.18 : UMN Mapserver CGI
> >> >
> >> > I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to
> shared
> >> > libraries to run.  However, I can't seem to get whatever shell that
> Tomcat
> >> > uses to run CGIs seeded with that variable.
> >> >
> >> > I tried putting it in the "setenv.sh" which is checked for and used
> in
> >> > catalina.sh, but that doesn't seem to have any effect on CGIs.
> >> >
> >> > Anyone have an idea?
> >> >
> >> > Colin
> >> >
> >> >
> >> > -
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> >
> >> > -
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >Sean Dockery
> >[EMAIL PROTECTED]
> >Certified Java Web Component Developer
> >Certified Delphi Programmer
> >SBD Consultants
> >http://www.sbdconsultants.com
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> Sean Dockery
> [EMAIL PROTECTED]
> Certified Java Web Component Developer
> Certified Delphi Programmer
> SBD Consultants
> http://www.sbdconsultants.com
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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




RE: CGI environment vars

2003-02-05 Thread Sean Dockery
Other possible solution attempts include an  tag in web.xml or 
an  tag in the server.xml.

At 10:43 2003-02-05 -0700, you wrote:
What about setting the variable yourself in the catalina.sh script?  If 
that doesn't work, make sure that the variable is exported (so that it 
remains in the super shell when the sub shell exits).  Example:

LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;

At 11:23 2003-02-05 -0600, you wrote:
no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
servlet set up to handle it already, and the CGI is getting executed but the
logs show that it's getting an error loading ld.so because it can't find it
(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).

> -Original Message-
> From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 11:21 AM
> To:   Tomcat Users List
> Subject:  RE: CGI environment vars
>
> how about you do it yourself, I assume that you launch your CGI script
> using Runtime.exec
> in that case, use the method that
>
> http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
>
> take a look at
>
> Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
>
> -Original Message-
> From: Madere, Colin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 8:44 AM
> To: [EMAIL PROTECTED]
> Subject: CGI environment vars
>
>
> Tomcat 4.1.18 : UMN Mapserver CGI
>
> I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
> libraries to run.  However, I can't seem to get whatever shell that Tomcat
> uses to run CGIs seeded with that variable.
>
> I tried putting it in the "setenv.sh" which is checked for and used in
> catalina.sh, but that doesn't seem to have any effect on CGIs.
>
> Anyone have an idea?
>
> Colin
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




Re: CGI environment vars

2003-02-05 Thread Kenny G. Dubuisson, Jr.
I don't know if this info will help but here it is.  I had the same problem
but in Apache.  I had to use the mod_env module in Apache to set the
environment variable to show up to my CGI scripts.  Maybe Tomcat has
something similar.  Just a thought...
Kenny

- Original Message -
From: "Filip Hanik" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 05, 2003 11:36 AM
Subject: RE: CGI environment vars


Looking at the source code of the CGIServlet, these variables are not set
anywhere.
My recommendation would be that you modify this servlet to fit your needs,
or even easier,
why don't you just put the LD_LIBRARY_PATH inside your CGI scripts?

Filip

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 9:23 AM
To: 'Tomcat Users List'
Subject: RE: CGI environment vars


no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
servlet set up to handle it already, and the CGI is getting executed but the
logs show that it's getting an error loading ld.so because it can't find it
(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).

> -Original Message-
> From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 11:21 AM
> To: Tomcat Users List
> Subject: RE: CGI environment vars
>
> how about you do it yourself, I assume that you launch your CGI script
> using Runtime.exec
> in that case, use the method that
>
> http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
>
> take a look at
>
> Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
>
> -Original Message-
> From: Madere, Colin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 8:44 AM
> To: [EMAIL PROTECTED]
> Subject: CGI environment vars
>
>
> Tomcat 4.1.18 : UMN Mapserver CGI
>
> I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
> libraries to run.  However, I can't seem to get whatever shell that Tomcat
> uses to run CGIs seeded with that variable.
>
> I tried putting it in the "setenv.sh" which is checked for and used in
> catalina.sh, but that doesn't seem to have any effect on CGIs.
>
> Anyone have an idea?
>
> Colin
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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









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


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




RE: CGI environment vars

2003-02-05 Thread Sean Dockery
What about setting the variable yourself in the catalina.sh script?  If 
that doesn't work, make sure that the variable is exported (so that it 
remains in the super shell when the sub shell exits).  Example:

LD_LIBRARY_PATH=.../.../ld.so; export LD_LIBRARY_PATH;

At 11:23 2003-02-05 -0600, you wrote:
no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
servlet set up to handle it already, and the CGI is getting executed but the
logs show that it's getting an error loading ld.so because it can't find it
(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).

> -Original Message-
> From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 11:21 AM
> To:   Tomcat Users List
> Subject:  RE: CGI environment vars
>
> how about you do it yourself, I assume that you launch your CGI script
> using Runtime.exec
> in that case, use the method that
>
> http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
>
> take a look at
>
> Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
>
> -Original Message-
> From: Madere, Colin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 8:44 AM
> To: [EMAIL PROTECTED]
> Subject: CGI environment vars
>
>
> Tomcat 4.1.18 : UMN Mapserver CGI
>
> I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
> libraries to run.  However, I can't seem to get whatever shell that Tomcat
> uses to run CGIs seeded with that variable.
>
> I tried putting it in the "setenv.sh" which is checked for and used in
> catalina.sh, but that doesn't seem to have any effect on CGIs.
>
> Anyone have an idea?
>
> Colin
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



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




RE: CGI environment vars

2003-02-05 Thread Filip Hanik
Looking at the source code of the CGIServlet, these variables are not set anywhere.
My recommendation would be that you modify this servlet to fit your needs, or even 
easier,
why don't you just put the LD_LIBRARY_PATH inside your CGI scripts?

Filip

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 9:23 AM
To: 'Tomcat Users List'
Subject: RE: CGI environment vars


no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
servlet set up to handle it already, and the CGI is getting executed but the
logs show that it's getting an error loading ld.so because it can't find it
(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).

> -Original Message-
> From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 11:21 AM
> To:   Tomcat Users List
> Subject:  RE: CGI environment vars
> 
> how about you do it yourself, I assume that you launch your CGI script
> using Runtime.exec
> in that case, use the method that 
> 
> http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
> 
> take a look at
> 
> Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
> 
> -Original Message-
> From: Madere, Colin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 8:44 AM
> To: [EMAIL PROTECTED]
> Subject: CGI environment vars
> 
> 
> Tomcat 4.1.18 : UMN Mapserver CGI
> 
> I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
> libraries to run.  However, I can't seem to get whatever shell that Tomcat
> uses to run CGIs seeded with that variable.
> 
> I tried putting it in the "setenv.sh" which is checked for and used in
> catalina.sh, but that doesn't seem to have any effect on CGIs.
> 
> Anyone have an idea?
> 
> Colin
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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



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


RE: CGI environment vars

2003-02-05 Thread Madere, Colin
no no.. I'm using the CGI facility in Tomcat (see Tomcat docs).  There's a
servlet set up to handle it already, and the CGI is getting executed but the
logs show that it's getting an error loading ld.so because it can't find it
(which is also the case when trying to run it in a shell without having
LD_LIBRARY_PATH set appropriately).

> -Original Message-
> From: Filip Hanik [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 11:21 AM
> To:   Tomcat Users List
> Subject:  RE: CGI environment vars
> 
> how about you do it yourself, I assume that you launch your CGI script
> using Runtime.exec
> in that case, use the method that 
> 
> http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
> 
> take a look at
> 
> Runtime.exec(java.lang.String,java.lang.String[],java.io.File)
> 
> -Original Message-
> From: Madere, Colin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 8:44 AM
> To: [EMAIL PROTECTED]
> Subject: CGI environment vars
> 
> 
> Tomcat 4.1.18 : UMN Mapserver CGI
> 
> I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
> libraries to run.  However, I can't seem to get whatever shell that Tomcat
> uses to run CGIs seeded with that variable.
> 
> I tried putting it in the "setenv.sh" which is checked for and used in
> catalina.sh, but that doesn't seem to have any effect on CGIs.
> 
> Anyone have an idea?
> 
> Colin
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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




RE: CGI environment vars

2003-02-05 Thread Filip Hanik
how about you do it yourself, I assume that you launch your CGI script using 
Runtime.exec
in that case, use the method that 

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html

take a look at

Runtime.exec(java.lang.String,java.lang.String[],java.io.File)

-Original Message-
From: Madere, Colin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: CGI environment vars


Tomcat 4.1.18 : UMN Mapserver CGI

I have a CGI which needs to see the "LD_LIBRARY_PATH" to get to shared
libraries to run.  However, I can't seem to get whatever shell that Tomcat
uses to run CGIs seeded with that variable.

I tried putting it in the "setenv.sh" which is checked for and used in
catalina.sh, but that doesn't seem to have any effect on CGIs.

Anyone have an idea?

Colin


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


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