Re: CGI difficulty, binmode(STDIN) not working in FileUpload

2005-09-24 Thread Mark Thomas

Ron Cozad wrote:

I have a form input on a html page that does a file upload.  I am only
getting the first 3k of an upload file.  If the file is less than 3k,
the multipart boundaries are structured properly, otherwise, I never get
the end of the file or the ending boundary.

 


I did binmode(STDIN); but still not getting the whole file.

 


Running Tomcat 4.1.31 and IE browser 6.x.

 


Appreciate any suggestions or theories as to why I am not getting the
whole file.


There is a bug in the CGIServlet (32023) that has been fixed in the 
latest version available from SVN.


http://svn.apache.org/repos/asf/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java



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



Re: CGI

2005-02-18 Thread Mark Thomas
Kelly, Steve wrote:
Hi,
 
Is the following consistent with how CGI perl scripts should execute
under a tomcat webapp?
 
I have a webapp called mywebapp and a perl script called myperl
The web.xml file contains the following:
 
  servlet
servlet-namecgi/servlet-name
 
servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
init-param
  param-nameclientInputTimeout/param-name
  param-value100/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value6/param-value
/init-param
init-param
  param-nameexecutable/param-name
  param-valueperl/param-value
/init-param
init-param
  param-namecgiPathPrefix/param-name
  param-valueWEB-INF/cgi/param-value
/init-param
 load-on-startup5/load-on-startup
/servlet
 
and
 
servlet-mapping
servlet-namecgi/servlet-name
url-pattern/cgi-bin/*/url-pattern
/servlet-mapping
 
If I enter the url //localhost:8080/mywebapp/WEB-INF/cgi/myperl I get a
resource unavailable error.
Correct. Resources under WEB-INF are not directly accessible.
If I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it executes
the myperl script successsfully.
Also correct.
 
If I edit the web.xml file to change the cgiPathPrefix to, for example,
myscripts/cgi and then  
I enter the url //localhost:8080/mywebapp/myscripts/cgi/myperl it simply
displays the perl script code.
This is as expected for the configuration settings. However, I wouldn't 
want to run my server like this. It is usually a bad thing (tm) from a 
security point of view to expose your CGI script.

Again if I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it
executes the myperl script successsfully.
Also, as expected from the config settings.
HTH,
Mark
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: CGI

2005-02-18 Thread Kelly, Steve
Hi Mark,

Yes, thanks. That confirms what I'm seeing. Only problem is I have some
freebie product (the Spellchecker plugin for HTMLArea) that needs to
execute a perl script to call the Aspell spell checker, which gets
invoked from somewhere inside the plugin's javascript I believe using
some form of relative addressing. Does this mean I either need to edit
the javascript or I can't do it ?

Steve.   

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: 18 February 2005 19:28
To: Tomcat Users List
Subject: Re: CGI

Kelly, Steve wrote:
 Hi,
  
 Is the following consistent with how CGI perl scripts should execute 
 under a tomcat webapp?
  
 I have a webapp called mywebapp and a perl script called myperl The 
 web.xml file contains the following:
  
   servlet
 servlet-namecgi/servlet-name
  
 servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
 init-param
   param-nameclientInputTimeout/param-name
   param-value100/param-value
 /init-param
 init-param
   param-namedebug/param-name
   param-value6/param-value
 /init-param
 init-param
   param-nameexecutable/param-name
   param-valueperl/param-value
 /init-param
 init-param
   param-namecgiPathPrefix/param-name
   param-valueWEB-INF/cgi/param-value
 /init-param
  load-on-startup5/load-on-startup
 /servlet
  
 and
  
 servlet-mapping
 servlet-namecgi/servlet-name
 url-pattern/cgi-bin/*/url-pattern
 /servlet-mapping
  
 If I enter the url //localhost:8080/mywebapp/WEB-INF/cgi/myperl I get 
 a resource unavailable error.

Correct. Resources under WEB-INF are not directly accessible.

 If I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it 
 executes the myperl script successsfully.

Also correct.

  
 If I edit the web.xml file to change the cgiPathPrefix to, for 
 example, myscripts/cgi and then I enter the url 
 //localhost:8080/mywebapp/myscripts/cgi/myperl it simply displays the 
 perl script code.

This is as expected for the configuration settings. However, I wouldn't
want to run my server like this. It is usually a bad thing (tm) from a
security point of view to expose your CGI script.

 Again if I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it 
 executes the myperl script successsfully.

Also, as expected from the config settings.

HTH,

Mark

-
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

2005-02-18 Thread Mark Thomas
There is another option. You can change the CGI servlet mapping to use 
extension mapping. If you map it to *.cgi or *.pl or whatever you use on 
your system, CGI scripts in the 'normal' web app path should be served 
by the CGI servlet.

Mark
Kelly, Steve wrote:
Hi Mark,
Yes, thanks. That confirms what I'm seeing. Only problem is I have some
freebie product (the Spellchecker plugin for HTMLArea) that needs to
execute a perl script to call the Aspell spell checker, which gets
invoked from somewhere inside the plugin's javascript I believe using
some form of relative addressing. Does this mean I either need to edit
the javascript or I can't do it ?
Steve.   

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: 18 February 2005 19:28
To: Tomcat Users List
Subject: Re: CGI

Kelly, Steve wrote:
Hi,
Is the following consistent with how CGI perl scripts should execute 
under a tomcat webapp?

I have a webapp called mywebapp and a perl script called myperl The 
web.xml file contains the following:

 servlet
   servlet-namecgi/servlet-name
servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
   init-param
 param-nameclientInputTimeout/param-name
 param-value100/param-value
   /init-param
   init-param
 param-namedebug/param-name
 param-value6/param-value
   /init-param
   init-param
 param-nameexecutable/param-name
 param-valueperl/param-value
   /init-param
   init-param
 param-namecgiPathPrefix/param-name
 param-valueWEB-INF/cgi/param-value
   /init-param
load-on-startup5/load-on-startup
   /servlet

and

   servlet-mapping
   servlet-namecgi/servlet-name
   url-pattern/cgi-bin/*/url-pattern
   /servlet-mapping
If I enter the url //localhost:8080/mywebapp/WEB-INF/cgi/myperl I get 
a resource unavailable error.

Correct. Resources under WEB-INF are not directly accessible.

If I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it 
executes the myperl script successsfully.

Also correct.

If I edit the web.xml file to change the cgiPathPrefix to, for 
example, myscripts/cgi and then I enter the url 
//localhost:8080/mywebapp/myscripts/cgi/myperl it simply displays the 
perl script code.

This is as expected for the configuration settings. However, I wouldn't
want to run my server like this. It is usually a bad thing (tm) from a
security point of view to expose your CGI script.

Again if I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it 
executes the myperl script successsfully.

Also, as expected from the config settings.
HTH,
Mark
-
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

2005-02-18 Thread Kelly, Steve
Thanks - I'll give it a try. 

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: 18 February 2005 19:51
To: Tomcat Users List
Subject: Re: CGI

There is another option. You can change the CGI servlet mapping to use
extension mapping. If you map it to *.cgi or *.pl or whatever you use on
your system, CGI scripts in the 'normal' web app path should be served
by the CGI servlet.

Mark

Kelly, Steve wrote:
 Hi Mark,
 
 Yes, thanks. That confirms what I'm seeing. Only problem is I have 
 some freebie product (the Spellchecker plugin for HTMLArea) that needs

 to execute a perl script to call the Aspell spell checker, which gets 
 invoked from somewhere inside the plugin's javascript I believe using 
 some form of relative addressing. Does this mean I either need to edit

 the javascript or I can't do it ?
 
 Steve.   
 
 -Original Message-
 From: Mark Thomas [mailto:[EMAIL PROTECTED]
 Sent: 18 February 2005 19:28
 To: Tomcat Users List
 Subject: Re: CGI
 
 Kelly, Steve wrote:
 
Hi,
 
Is the following consistent with how CGI perl scripts should execute 
under a tomcat webapp?
 
I have a webapp called mywebapp and a perl script called myperl The 
web.xml file contains the following:
 
  servlet
servlet-namecgi/servlet-name
 
servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
init-param
  param-nameclientInputTimeout/param-name
  param-value100/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value6/param-value
/init-param
init-param
  param-nameexecutable/param-name
  param-valueperl/param-value
/init-param
init-param
  param-namecgiPathPrefix/param-name
  param-valueWEB-INF/cgi/param-value
/init-param
 load-on-startup5/load-on-startup
/servlet
 
and
 
servlet-mapping
servlet-namecgi/servlet-name
url-pattern/cgi-bin/*/url-pattern
/servlet-mapping
 
If I enter the url //localhost:8080/mywebapp/WEB-INF/cgi/myperl I get 
a resource unavailable error.
 
 
 Correct. Resources under WEB-INF are not directly accessible.
 
 
If I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it 
executes the myperl script successsfully.
 
 
 Also correct.
 
 
 
If I edit the web.xml file to change the cgiPathPrefix to, for 
example, myscripts/cgi and then I enter the url 
//localhost:8080/mywebapp/myscripts/cgi/myperl it simply displays the 
perl script code.
 
 
 This is as expected for the configuration settings. However, I 
 wouldn't want to run my server like this. It is usually a bad thing 
 (tm) from a security point of view to expose your CGI script.
 
 
Again if I enter the url //localhost:8080/mywebapp/cgi-bin/myperl it 
executes the myperl script successsfully.
 
 
 Also, as expected from the config settings.
 
 HTH,
 
 Mark
 
 -
 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 variables

2005-01-11 Thread Pierrick Brihaye
Hi,
Mark Thomas a crit :
Everything is OK when passShellEnvironment is used with the JDK 
1.4/Windows 98 unfriendly version 5.5.4. Great !
5.5.4 runs quite happily for me on JDK 1.4 (heck I do all of my 5.5.x 
development work on a 1.4 JDK). Can't say the same for Windows 98 - I 
use XP.
5.5.4 runs OK on Windows 98 with the JDK 1.4. My comments were about :
1) the need for the compat package
2) *.bat files that use a NT specific syntax (especially %CD%)
3) the apparent necessity to have 8.3 conformant paths.
In other terms, on Windows 98, Tomcat is not as easy to install and run 
as it used to be since 4.x versions. Dot.

Shouldn't the non-support of passShellEnvironment be mentionned in the 
5.0.x docs ?
That fact it isn't mentioned is a pretty big hint ;).
Seriously, I do not think it is realistic to document everything that 
isn't implemented in one version that is in another. It leads to a 
unmaintainable mess of documentation.
This is understandable but the fact that this parameter was present in 
4.1 versions may indicate a regression. Wether assumed or not, a 
single line in the docs would prevent overconfidence from people like me 
:-))

This is how I reasoned :
1) passShellEnvironment is OK on 4.1
2) 4.1.28 has a CGI bug with binary content
3) an upgrade is necessary
4) 5.5.x is difficult (at least for my users) to install on Windows 98
5) 5.0.x is easy to install on Windows 98
6) an upgrade to 5.0.x should solve all my problems :-)
BTW, I am pretty certain that if you take a cgiservlet.jar from 5.5.x 
and replace the one you downloaded with 5.0.x it will work quite happily.
I didn't think about it :-) I'll have a try.
Everything is fine anyway : this is by far the most important.
Cheers,
--
Pierrick Brihaye, informaticien
Service rgional de l'Inventaire
DRAC Bretagne
mailto:[EMAIL PROTECTED]
+33 (0)2 99 29 67 78
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: CGI : environment variables

2005-01-10 Thread Pierrick Brihaye
Aswering to myself...
Pierrick Brihaye a crit :
I can't find any valuable help in the list archives. The 
passShellEnvironment init-parameter, which has a very promising name 
;-), seems to be applicable to 4.1 releases only 
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/cgi-howto.html).
Everything is OK when passShellEnvironment is used with the JDK 
1.4/Windows 98 unfriendly version 5.5.4. Great !

Shouldn't the non-support of passShellEnvironment be mentionned in the 
5.0.x docs ?

Cheers,
--
Pierrick Brihaye, informaticien
Service rgional de l'Inventaire
DRAC Bretagne
mailto:[EMAIL PROTECTED]
+33 (0)2 99 29 67 78
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: CGI : environment variables

2005-01-10 Thread Mark Thomas
Pierrick Brihaye wrote:
Aswering to myself...
Pierrick Brihaye a crit :
I can't find any valuable help in the list archives. The 
passShellEnvironment init-parameter, which has a very promising name 
;-), seems to be applicable to 4.1 releases only 
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/cgi-howto.html).

Everything is OK when passShellEnvironment is used with the JDK 
1.4/Windows 98 unfriendly version 5.5.4. Great !
5.5.4 runs quite happily for me on JDK 1.4 (heck I do all of my 5.5.x 
development work on a 1.4 JDK). Can't say the same for Windows 98 - I 
use XP.

Shouldn't the non-support of passShellEnvironment be mentionned in the 
5.0.x docs ?
That fact it isn't mentioned is a pretty big hint ;).
Seriously, I do not think it is realistic to document everything that 
isn't implemented in one version that is in another. It leads to a 
unmaintainable mess of documentation.

BTW, I am pretty certain that if you take a cgiservlet.jar from 5.5.x 
and replace the one you downloaded with 5.0.x it will work quite happily.

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


RE: CGI Again...Servlet.service() for servlet cgi threw exception. Solved!

2004-11-23 Thread Sergey Kamshilin
Phillip,

I didn't have -wT option in my script, but thank you anyway because the
problem was in front and tailing /...
So, if you put / in front or/and in tail of

param-value/WEB-INF/cgi-bin//param-value

You receive this error.
Thank you!

/Sergeyk

(Lab Documentation -
\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
Phone: 604 918-6360
Cell:  604 351-8966

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 22, 2004 1:48 PM
 To: 'Tomcat Users List'
 Subject: RE: CGI Again...Servlet.service() for servlet cgi threw
 exception


 CGIServlet does not support -wT in your perl script. Those
 switches are for
 debugging in perl. They are after your perl command, so, for
 example, if you
 test.pl contains

  #!/bin/perl -wT

 Then remove the -wT.

 Other things to check:

 - in your conf/web.xml, no need to put leading /

   param-namecgiPathPrefix/param-name
   param-valueWEB-INF/cgi-bin//param-value


 Other than that, I can't think of any reason why you are unable to execute
 scripts using CGIServlet.



 -Original Message-
 From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
 Sent: November 22, 2004 4:40 PM
 To: Tomcat Users List
 Subject: RE: CGI Again...Servlet.service() for servlet cgi threw exception


 Phillip,

 Where do I have -wT???

 /Sergeyk

 (Lab Documentation -
 \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
 Phone: 604 918-6360
 Cell:  604 351-8966

  -Original Message-
  From: Phillip Qin [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 22, 2004 1:11 PM
  To: 'Tomcat Users List'
  Subject: RE: CGI Again...Servlet.service() for servlet cgi threw
  exception
 
 
  Remove -wT from your script.
 
  -Original Message-
  From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
  Sent: November 22, 2004 3:51 PM
  To: Tomcat Users List
  Subject: RE: CGI Again...Servlet.service() for servlet cgi threw
  exception
 
 
  Hello Mark,
 
  Servlet mapping:
  -
  !-- The mapping for the CGI Gateway servlet --
  servlet-mapping
  servlet-namecgi/servlet-name
  url-pattern/cgi-bin/*/url-pattern
  /servlet-mapping
  -
  The URL: http://zee:8080/cgi-bin/index.pl
 
  Script index.pl:
  -
  #!/bin/perl
 
  print Content type: text/html\n\n;
  print Hello World\n;
  -
 
  Thank you!
 
  /Sergeyk
 
  (Lab Documentation -
  \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
  Phone: 604 918-6360
  Cell:  604 351-8966
 
   -Original Message-
   From: Mark Thomas [mailto:[EMAIL PROTECTED]
   Sent: Sunday, November 21, 2004 9:11 AM
   To: 'Tomcat Users List'
   Subject: RE: CGI Again...Servlet.service() for servlet cgi threw
   exception
  
  
   I'll look into this but I need a bit more info:
  
   1. What servlet mapping did you specify in web.xml?
   2. What URL are you requesting?
  
   Mark
  
-Original Message-
From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 20, 2004 12:00 AM
To: [EMAIL PROTECTED]
Subject: CGI Again...Servlet.service() for servlet cgi threw
exception
   
Sorry guys, I gave up digging into it and haven't seen such
problems in archives...
   
Tomcat 4.1.31 on Solaris.
   
I enabled cgi scripting:
changes in web.xml:
--
servlet
servlet-namecgi/servlet-name
   
   
 servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
init-param
  param-namedebug/param-name
  param-value6/param-value
/init-param
init-param
  param-namecgiPathPrefix/param-name
  param-value/WEB-INF/cgi-bin//param-value
/init-param
load-on-startup5/load-on-startup
/servlet
--
renamed servlets-cgi.jar
   
The script is
/usr/jakarta-tomcat/webapps/ROOT/WEB-INF/cgi-bin/index.pl
(Everything is OK, Right?)

when I try to access it I got the error:
2004-11-19 15:53:15 cgi: findCGI: path=/index.cgi,
/usr/jakarta-tomcat-4.1.31/webapps/ROOT//WEB-INF/cgi-bin/
2004-11-19 15:53:15 cgi: findCGI:
currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
2004-11-19 15:53:15 cgi: findCGI:
currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
2004-11-19 15:53:15 cgi: findCGI: FOUND cgi at
/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin/index.cgi
2004-11-19 15:53:15 StandardWrapperValve[cgi]:
Servlet.service() for servlet
cgi threw exception
java.lang.StringIndexOutOfBoundsException: String index out of
range: -2
at java.lang.String.substring(String.java:1444)
at java.lang.String.substring(String.java:1411)
at
org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI
(CGIServlet.ja
va:935

RE: CGI Again...Servlet.service() for servlet cgi threw exception

2004-11-22 Thread Sergey Kamshilin
Hello Mark,

Servlet mapping:
-
!-- The mapping for the CGI Gateway servlet --
servlet-mapping
servlet-namecgi/servlet-name
url-pattern/cgi-bin/*/url-pattern
/servlet-mapping
-
The URL: http://zee:8080/cgi-bin/index.pl

Script index.pl:
-
#!/bin/perl

print Content type: text/html\n\n;
print Hello World\n;
-

Thank you!

/Sergeyk

(Lab Documentation -
\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
Phone: 604 918-6360
Cell:  604 351-8966

 -Original Message-
 From: Mark Thomas [mailto:[EMAIL PROTECTED]
 Sent: Sunday, November 21, 2004 9:11 AM
 To: 'Tomcat Users List'
 Subject: RE: CGI Again...Servlet.service() for servlet cgi threw exception


 I'll look into this but I need a bit more info:

 1. What servlet mapping did you specify in web.xml?
 2. What URL are you requesting?

 Mark

  -Original Message-
  From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
  Sent: Saturday, November 20, 2004 12:00 AM
  To: [EMAIL PROTECTED]
  Subject: CGI Again...Servlet.service() for servlet cgi threw exception
 
  Sorry guys, I gave up digging into it and haven't seen such
  problems in
  archives...
 
  Tomcat 4.1.31 on Solaris.
 
  I enabled cgi scripting:
  changes in web.xml:
  --
  servlet
  servlet-namecgi/servlet-name
 
  servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
  init-param
param-namedebug/param-name
param-value6/param-value
  /init-param
  init-param
param-namecgiPathPrefix/param-name
param-value/WEB-INF/cgi-bin//param-value
  /init-param
  load-on-startup5/load-on-startup
  /servlet
  --
  renamed servlets-cgi.jar
 
  The script is
  /usr/jakarta-tomcat/webapps/ROOT/WEB-INF/cgi-bin/index.pl
  (Everything is OK, Right?)
  
  when I try to access it I got the error:
  2004-11-19 15:53:15 cgi: findCGI: path=/index.cgi,
  /usr/jakarta-tomcat-4.1.31/webapps/ROOT//WEB-INF/cgi-bin/
  2004-11-19 15:53:15 cgi: findCGI:
  currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
  2004-11-19 15:53:15 cgi: findCGI:
  currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
  2004-11-19 15:53:15 cgi: findCGI: FOUND cgi at
  /usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin/index.cgi
  2004-11-19 15:53:15 StandardWrapperValve[cgi]:
  Servlet.service() for servlet
  cgi threw exception
  java.lang.StringIndexOutOfBoundsException: String index out
  of range: -2
  at java.lang.String.substring(String.java:1444)
  at java.lang.String.substring(String.java:1411)
  at
  org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI
  (CGIServlet.ja
  va:935)
  
  Why the servlet makes exception What else I need to check?
 
  Thank you!
 
  /Sergeyk
 
  (Lab Documentation -
  \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
  Phone: 604 918-6360
  Cell:  604 351-8966
 
 
  -
  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 Again...Servlet.service() for servlet cgi threw exception

2004-11-22 Thread Phillip Qin
Remove -wT from your script.

-Original Message-
From: Sergey Kamshilin [mailto:[EMAIL PROTECTED] 
Sent: November 22, 2004 3:51 PM
To: Tomcat Users List
Subject: RE: CGI Again...Servlet.service() for servlet cgi threw exception


Hello Mark,

Servlet mapping:
-
!-- The mapping for the CGI Gateway servlet --
servlet-mapping
servlet-namecgi/servlet-name
url-pattern/cgi-bin/*/url-pattern
/servlet-mapping
-
The URL: http://zee:8080/cgi-bin/index.pl

Script index.pl:
-
#!/bin/perl

print Content type: text/html\n\n;
print Hello World\n;
-

Thank you!

/Sergeyk

(Lab Documentation -
\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
Phone: 604 918-6360
Cell:  604 351-8966

 -Original Message-
 From: Mark Thomas [mailto:[EMAIL PROTECTED]
 Sent: Sunday, November 21, 2004 9:11 AM
 To: 'Tomcat Users List'
 Subject: RE: CGI Again...Servlet.service() for servlet cgi threw 
 exception


 I'll look into this but I need a bit more info:

 1. What servlet mapping did you specify in web.xml?
 2. What URL are you requesting?

 Mark

  -Original Message-
  From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
  Sent: Saturday, November 20, 2004 12:00 AM
  To: [EMAIL PROTECTED]
  Subject: CGI Again...Servlet.service() for servlet cgi threw 
  exception
 
  Sorry guys, I gave up digging into it and haven't seen such problems 
  in archives...
 
  Tomcat 4.1.31 on Solaris.
 
  I enabled cgi scripting:
  changes in web.xml:
  --
  servlet
  servlet-namecgi/servlet-name
 
  servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
  init-param
param-namedebug/param-name
param-value6/param-value
  /init-param
  init-param
param-namecgiPathPrefix/param-name
param-value/WEB-INF/cgi-bin//param-value
  /init-param
  load-on-startup5/load-on-startup
  /servlet
  --
  renamed servlets-cgi.jar
 
  The script is 
  /usr/jakarta-tomcat/webapps/ROOT/WEB-INF/cgi-bin/index.pl
  (Everything is OK, Right?)
  
  when I try to access it I got the error:
  2004-11-19 15:53:15 cgi: findCGI: path=/index.cgi, 
  /usr/jakarta-tomcat-4.1.31/webapps/ROOT//WEB-INF/cgi-bin/
  2004-11-19 15:53:15 cgi: findCGI: 
  currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
  2004-11-19 15:53:15 cgi: findCGI: 
  currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
  2004-11-19 15:53:15 cgi: findCGI: FOUND cgi at 
  /usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin/index.cgi
  2004-11-19 15:53:15 StandardWrapperValve[cgi]:
  Servlet.service() for servlet
  cgi threw exception
  java.lang.StringIndexOutOfBoundsException: String index out of 
  range: -2
  at java.lang.String.substring(String.java:1444)
  at java.lang.String.substring(String.java:1411)
  at 
  org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI
  (CGIServlet.ja
  va:935)
  
  Why the servlet makes exception What else I need to check?
 
  Thank you!
 
  /Sergeyk
 
  (Lab Documentation -
  \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
  Phone: 604 918-6360
  Cell:  604 351-8966
 
 
  
  -
  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]


!DSPAM:41a25140121671906480252!


RE: CGI Again...Servlet.service() for servlet cgi threw exception

2004-11-22 Thread Sergey Kamshilin
Phillip,

Where do I have -wT???

/Sergeyk

(Lab Documentation -
\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
Phone: 604 918-6360
Cell:  604 351-8966

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 22, 2004 1:11 PM
 To: 'Tomcat Users List'
 Subject: RE: CGI Again...Servlet.service() for servlet cgi threw
 exception


 Remove -wT from your script.

 -Original Message-
 From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
 Sent: November 22, 2004 3:51 PM
 To: Tomcat Users List
 Subject: RE: CGI Again...Servlet.service() for servlet cgi threw exception


 Hello Mark,

 Servlet mapping:
 -
 !-- The mapping for the CGI Gateway servlet --
 servlet-mapping
 servlet-namecgi/servlet-name
 url-pattern/cgi-bin/*/url-pattern
 /servlet-mapping
 -
 The URL: http://zee:8080/cgi-bin/index.pl

 Script index.pl:
 -
 #!/bin/perl

 print Content type: text/html\n\n;
 print Hello World\n;
 -

 Thank you!

 /Sergeyk

 (Lab Documentation -
 \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
 Phone: 604 918-6360
 Cell:  604 351-8966

  -Original Message-
  From: Mark Thomas [mailto:[EMAIL PROTECTED]
  Sent: Sunday, November 21, 2004 9:11 AM
  To: 'Tomcat Users List'
  Subject: RE: CGI Again...Servlet.service() for servlet cgi threw
  exception
 
 
  I'll look into this but I need a bit more info:
 
  1. What servlet mapping did you specify in web.xml?
  2. What URL are you requesting?
 
  Mark
 
   -Original Message-
   From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
   Sent: Saturday, November 20, 2004 12:00 AM
   To: [EMAIL PROTECTED]
   Subject: CGI Again...Servlet.service() for servlet cgi threw
   exception
  
   Sorry guys, I gave up digging into it and haven't seen such problems
   in archives...
  
   Tomcat 4.1.31 on Solaris.
  
   I enabled cgi scripting:
 changes in web.xml:
   --
   servlet
   servlet-namecgi/servlet-name
  
   servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
   init-param
 param-namedebug/param-name
 param-value6/param-value
   /init-param
   init-param
 param-namecgiPathPrefix/param-name
 param-value/WEB-INF/cgi-bin//param-value
   /init-param
   load-on-startup5/load-on-startup
   /servlet
   --
 renamed servlets-cgi.jar
  
   The script is
   /usr/jakarta-tomcat/webapps/ROOT/WEB-INF/cgi-bin/index.pl
   (Everything is OK, Right?)
   
   when I try to access it I got the error:
   2004-11-19 15:53:15 cgi: findCGI: path=/index.cgi,
   /usr/jakarta-tomcat-4.1.31/webapps/ROOT//WEB-INF/cgi-bin/
   2004-11-19 15:53:15 cgi: findCGI:
   currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
   2004-11-19 15:53:15 cgi: findCGI:
   currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
   2004-11-19 15:53:15 cgi: findCGI: FOUND cgi at
   /usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin/index.cgi
   2004-11-19 15:53:15 StandardWrapperValve[cgi]:
   Servlet.service() for servlet
   cgi threw exception
   java.lang.StringIndexOutOfBoundsException: String index out of
   range: -2
   at java.lang.String.substring(String.java:1444)
   at java.lang.String.substring(String.java:1411)
   at
   org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI
   (CGIServlet.ja
   va:935)
   
   Why the servlet makes exception What else I need to check?
  
   Thank you!
  
   /Sergeyk
  
   (Lab Documentation -
   \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
   Phone: 604 918-6360
   Cell:  604 351-8966
  
  
   
   -
   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]


 !DSPAM:41a25140121671906480252!



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



RE: CGI Again...Servlet.service() for servlet cgi threw exception

2004-11-22 Thread Phillip Qin
CGIServlet does not support -wT in your perl script. Those switches are for
debugging in perl. They are after your perl command, so, for example, if you
test.pl contains

 #!/bin/perl -wT

Then remove the -wT.

Other things to check:

- in your conf/web.xml, no need to put leading /

  param-namecgiPathPrefix/param-name
  param-valueWEB-INF/cgi-bin//param-value


Other than that, I can't think of any reason why you are unable to execute
scripts using CGIServlet.



-Original Message-
From: Sergey Kamshilin [mailto:[EMAIL PROTECTED] 
Sent: November 22, 2004 4:40 PM
To: Tomcat Users List
Subject: RE: CGI Again...Servlet.service() for servlet cgi threw exception


Phillip,

Where do I have -wT???

/Sergeyk

(Lab Documentation -
\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
Phone: 604 918-6360
Cell:  604 351-8966

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 22, 2004 1:11 PM
 To: 'Tomcat Users List'
 Subject: RE: CGI Again...Servlet.service() for servlet cgi threw 
 exception


 Remove -wT from your script.

 -Original Message-
 From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
 Sent: November 22, 2004 3:51 PM
 To: Tomcat Users List
 Subject: RE: CGI Again...Servlet.service() for servlet cgi threw 
 exception


 Hello Mark,

 Servlet mapping:
 -
 !-- The mapping for the CGI Gateway servlet --
 servlet-mapping
 servlet-namecgi/servlet-name
 url-pattern/cgi-bin/*/url-pattern
 /servlet-mapping
 -
 The URL: http://zee:8080/cgi-bin/index.pl

 Script index.pl:
 -
 #!/bin/perl

 print Content type: text/html\n\n;
 print Hello World\n;
 -

 Thank you!

 /Sergeyk

 (Lab Documentation -
 \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
 Phone: 604 918-6360
 Cell:  604 351-8966

  -Original Message-
  From: Mark Thomas [mailto:[EMAIL PROTECTED]
  Sent: Sunday, November 21, 2004 9:11 AM
  To: 'Tomcat Users List'
  Subject: RE: CGI Again...Servlet.service() for servlet cgi threw 
  exception
 
 
  I'll look into this but I need a bit more info:
 
  1. What servlet mapping did you specify in web.xml?
  2. What URL are you requesting?
 
  Mark
 
   -Original Message-
   From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
   Sent: Saturday, November 20, 2004 12:00 AM
   To: [EMAIL PROTECTED]
   Subject: CGI Again...Servlet.service() for servlet cgi threw 
   exception
  
   Sorry guys, I gave up digging into it and haven't seen such 
   problems in archives...
  
   Tomcat 4.1.31 on Solaris.
  
   I enabled cgi scripting:
 changes in web.xml:
   --
   servlet
   servlet-namecgi/servlet-name
  
   servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
   init-param
 param-namedebug/param-name
 param-value6/param-value
   /init-param
   init-param
 param-namecgiPathPrefix/param-name
 param-value/WEB-INF/cgi-bin//param-value
   /init-param
   load-on-startup5/load-on-startup
   /servlet
   --
 renamed servlets-cgi.jar
  
   The script is 
   /usr/jakarta-tomcat/webapps/ROOT/WEB-INF/cgi-bin/index.pl
   (Everything is OK, Right?)
   
   when I try to access it I got the error:
   2004-11-19 15:53:15 cgi: findCGI: path=/index.cgi, 
   /usr/jakarta-tomcat-4.1.31/webapps/ROOT//WEB-INF/cgi-bin/
   2004-11-19 15:53:15 cgi: findCGI: 
   currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
   2004-11-19 15:53:15 cgi: findCGI: 
   currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
   2004-11-19 15:53:15 cgi: findCGI: FOUND cgi at 
   /usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin/index.cgi
   2004-11-19 15:53:15 StandardWrapperValve[cgi]:
   Servlet.service() for servlet
   cgi threw exception
   java.lang.StringIndexOutOfBoundsException: String index out of
   range: -2
   at java.lang.String.substring(String.java:1444)
   at java.lang.String.substring(String.java:1411)
   at 
   org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI
   (CGIServlet.ja
   va:935)
   
   Why the servlet makes exception What else I need to check?
  
   Thank you!
  
   /Sergeyk
  
   (Lab Documentation -
   \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
   Phone: 604 918-6360
   Cell:  604 351-8966
  
  
   --
   --
   -
   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

RE: CGI Again...Servlet.service() for servlet cgi threw exception

2004-11-21 Thread Mark Thomas
I'll look into this but I need a bit more info:

1. What servlet mapping did you specify in web.xml?
2. What URL are you requesting?

Mark

 -Original Message-
 From: Sergey Kamshilin [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, November 20, 2004 12:00 AM
 To: [EMAIL PROTECTED]
 Subject: CGI Again...Servlet.service() for servlet cgi threw exception
 
 Sorry guys, I gave up digging into it and haven't seen such 
 problems in
 archives...
 
 Tomcat 4.1.31 on Solaris.
 
 I enabled cgi scripting:
   changes in web.xml:
 --
 servlet
 servlet-namecgi/servlet-name
 
 servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
 init-param
   param-namedebug/param-name
   param-value6/param-value
 /init-param
 init-param
   param-namecgiPathPrefix/param-name
   param-value/WEB-INF/cgi-bin//param-value
 /init-param
 load-on-startup5/load-on-startup
 /servlet
 --
   renamed servlets-cgi.jar
 
 The script is 
 /usr/jakarta-tomcat/webapps/ROOT/WEB-INF/cgi-bin/index.pl
 (Everything is OK, Right?)
 
 when I try to access it I got the error:
 2004-11-19 15:53:15 cgi: findCGI: path=/index.cgi,
 /usr/jakarta-tomcat-4.1.31/webapps/ROOT//WEB-INF/cgi-bin/
 2004-11-19 15:53:15 cgi: findCGI:
 currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
 2004-11-19 15:53:15 cgi: findCGI:
 currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
 2004-11-19 15:53:15 cgi: findCGI: FOUND cgi at
 /usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin/index.cgi
 2004-11-19 15:53:15 StandardWrapperValve[cgi]: 
 Servlet.service() for servlet
 cgi threw exception
 java.lang.StringIndexOutOfBoundsException: String index out 
 of range: -2
 at java.lang.String.substring(String.java:1444)
 at java.lang.String.substring(String.java:1411)
 at
 org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI
 (CGIServlet.ja
 va:935)
 
 Why the servlet makes exception What else I need to check?
 
 Thank you!
 
 /Sergeyk
 
 (Lab Documentation -
 \\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description)
 Phone: 604 918-6360
 Cell:  604 351-8966
 
 
 -
 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 Servlet environmental variables

2004-11-13 Thread Mark Thomas
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:[EMAIL PROTECTED] 
 Sent: Friday, November 12, 2004 11:42 PM
 To: [EMAIL PROTECTED]
 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
 [EMAIL PROTECTED]
 (631) 344-2009
 Systems Administrator
 ITD Unix Services
 
 
 -
 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 ...yeah, I know (Tomcat 4.1.29)

2004-11-09 Thread Mark Claassen
Thanks.  I did what you suggested.

I still have one question though,  

How come when I copied the source from 4.1.31 directly into my own class
(with no dependencies) I got ClassNotFound exceptions and it would not run
unless I copied my jar file into shared?  It was the exact same code, just
the package was different.  There were no compile errors, (implying no
package dependency issues the compiler could detect)...  I just don't get
it.  I have code for other things (like valves) in there, and they work
fine.  I understand that webapps don't go here, but core catalina servlets
work fine...as long as the package name doesn't change.

Mark


 -Original Message-
 From: Mark Thomas [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 08, 2004 4:33 PM
 To: 'Tomcat Users List'
 Subject: RE: CGI ...yeah, I know (Tomcat 4.1.29)
 
 
 I think you have run into 
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24478 
 
 Sorry - this was entirely my fault and has since been fixed. 
 To get around this you can take the servlets-cgi.jar from an 
 earlier/later release if you don't want to upgrade your entire server.
 
 Again, please accept my apologies.
 
 Mark
 
  -Original Message-
  From: Mark Claassen [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 08, 2004 3:17 PM
  To: 'Tomcat Users List'
  Subject: RE: CGI ...yeah, I know (Tomcat 4.1.29)
  
  Thanks for the reply.  We have the debug set to 6 already.
  We found that it
  almost seems to alternate with the following error.  The 
  script is there,
  accessible, and executable by the user tomcat is running as.  
  We are not
  using a security manager.  One puzzling thing is that the 
  following path has
  two sets of quotes, but I was thinking that was just an error 
  in the log
  message.  We altered the program so that the first line of 
 the program
  touches a file so we can see if it ran at all.  It does not, 
  and we get
  either the No such file error or the Broken Pipe one.  
  Perhaps, though,
  the quotations are the crux of it all.
  
  In the localhost log we have:
  2004-11-08 10:06:13 cgi: findCGI: 
  currentLoc=/opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi
  2004-11-08 10:06:13 cgi: findCGI: 
  currentLoc=/opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi
  2004-11-08 10:06:13 cgi: findCGI: FOUND cgi at 
  /opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi/MRlogin.pl
  2004-11-08 10:06:13 cgi: findCGI calc: name=MRlogin.pl, 
  path=/opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi/MRlogin.pl,
  scriptname=/MRcgi/MRlogin.pl, cginame=/MRlogin.pl
  2004-11-08 10:06:13 cgi: runCGI(envp= ...
  2004-11-08 10:06:13 cgi: runCGI (stderr):Can't open perl script 
  /opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi/MRlogin.pl
 : No such
  file or directory 2004-11-08 10:06:13 cgi: runCGI: 1 lines 
 received on 
  stderr
  
   -Original Message-
   From: Phillip Qin [mailto:[EMAIL PROTECTED]
   Sent: Friday, November 05, 2004 5:20 PM
   To: 'Tomcat Users List'
   Subject: RE: CGI ...yeah, I know (Tomcat 4.1.29)
   
   
   Enable cgiservlet log (I usually set debug to 6) and see
   what's output in the log (very detail).
   
   -Original Message-
   From: Mark Claassen [mailto:[EMAIL PROTECTED]
   Sent: November 5, 2004 5:07 PM
   To: 'Tomcat Users List'
   Subject: CGI ...yeah, I know (Tomcat 4.1.29)
   
   
   I know that Tomcat is not an ideal CGI server, but I am
   having real trouble getting it to work at all.  Most often I 
   get the Exception below, and it doesn't seem to be running 
   our perl program at all.  (We can run the perl program by 
   hand though).  We had a bit of trouble getting it setup in 
   the first place, and we got errors way different from this.  
   I figured that since we were getting this, we must have 
   everything else setup correctly.
   
   Looking at the 4.1.27 source this is:
   1686: commandsStdIn.flush();
 commandsStdIn.close();
   commandsStdIn is the output stream to the process.
   
   Anyone have any ideas on where to start looking?
   
   Thanks,
   Mark
   
   java.io.IOException: Broken pipe
   at java.io.FileOutputStream.writeBytes(Native Method)
   at 
 java.io.FileOutputStream.write(FileOutputStream.java:257)
   at
   
  
 java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69)
   at
   java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127)
   at 
   java.io.BufferedOutputStream.flush(BufferedOutputStream.java:128)
   at
   org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServl
   et.java:1686)
   
   
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
   
   
   !DSPAM:418bf9fd252211451334454!
   
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional

RE: CGI ...yeah, I know (Tomcat 4.1.29)

2004-11-09 Thread Shapira, Yoav

Hi,

I still have one question though,

How come when I copied the source from 4.1.31 directly into my own
class
(with no dependencies) I got ClassNotFound exceptions and it would not
run

Was it really a CNFE or a NoClassDefFoundError?

You have to be very careful with dependencies once you start putting
stuff in shared, common, and server classloader repositories.  That's
why I recommend never doing that, and just keeping everything in your
WEB-INF/lib directory.

The reason you must be very careful is that class com.foo loaded from
shared/lib is not the same as com.foo loaded from common/lib or
WEB-INF/lib.  A class is unique within its classloader, and these are
distinct classloaders.  This leads to problems with applications that
package classes such that some classes are in more than one repository,
or that require upwards (common/lib needing WEB-INF/lib for example)
repository lookups.  No-no.

Yoav



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


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



RE: CGI ...yeah, I know (Tomcat 4.1.29)

2004-11-09 Thread Mark Claassen
2004-11-08 16:06:55 StandardContext[]: Servlet  threw load() exception
javax.servlet.ServletException: Wrapper cannot find servlet class
dsi.app.tomcat.DCGIServlet or a class it depends on
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:89
1)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3422)
...
- Root Cause -
java.lang.ClassNotFoundException: dsi.app.tomcat.DCGIServlet
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1443)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1289)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:88
5)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3422)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3623)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:754)

I thought I was being careful.  The only non-core library needed to compile
it needed was the catalina.jar, which is in that directory.  And it was the
exact same code.  I tried for hours to figure it out, and then I put it in
common and, bang, it worked.  The only change between the original tomcat
code and mine was the package.  And since it worked when I put it in common,
the web.xml information must have been correct.  The invoker servlet was off
the whole time.

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, November 09, 2004 8:52 AM
 To: Tomcat Users List
 Subject: RE: CGI ...yeah, I know (Tomcat 4.1.29)
 
 
 
 Hi,
 
 I still have one question though,
 
 How come when I copied the source from 4.1.31 directly into my own
 class
 (with no dependencies) I got ClassNotFound exceptions and it 
 would not
 run
 
 Was it really a CNFE or a NoClassDefFoundError?  
 
 You have to be very careful with dependencies once you start 
 putting stuff in shared, common, and server classloader 
 repositories.  That's why I recommend never doing that, and 
 just keeping everything in your WEB-INF/lib directory.
 
 The reason you must be very careful is that class com.foo 
 loaded from shared/lib is not the same as com.foo loaded from 
 common/lib or WEB-INF/lib.  A class is unique within its 
 classloader, and these are distinct classloaders.  This leads 
 to problems with applications that package classes such that 
 some classes are in more than one repository, or that require 
 upwards (common/lib needing WEB-INF/lib for example) 
 repository lookups.  No-no.
 
 Yoav
 
 
 
 This e-mail, including any attachments, is a confidential 
 business communication, and may contain information that is 
 confidential, proprietary and/or privileged.  This e-mail is 
 intended only for the individual(s) to whom it is addressed, 
 and may not be saved, copied, printed, disclosed or used by 
 anyone else.  If you are not the(an) intended recipient, 
 please immediately delete this e-mail from your computer 
 system and notify the sender.  Thank you.
 
 
 -
 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 ...yeah, I know (Tomcat 4.1.29)

2004-11-08 Thread Mark Claassen
Thanks for the reply.  We have the debug set to 6 already.  We found that it
almost seems to alternate with the following error.  The script is there,
accessible, and executable by the user tomcat is running as.  We are not
using a security manager.  One puzzling thing is that the following path has
two sets of quotes, but I was thinking that was just an error in the log
message.  We altered the program so that the first line of the program
touches a file so we can see if it ran at all.  It does not, and we get
either the No such file error or the Broken Pipe one.  Perhaps, though,
the quotations are the crux of it all.

In the localhost log we have:
2004-11-08 10:06:13 cgi: findCGI:
currentLoc=/opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi
2004-11-08 10:06:13 cgi: findCGI:
currentLoc=/opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi
2004-11-08 10:06:13 cgi: findCGI: FOUND cgi at
/opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi/MRlogin.pl
2004-11-08 10:06:13 cgi: findCGI calc: name=MRlogin.pl,
path=/opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi/MRlogin.pl,
scriptname=/MRcgi/MRlogin.pl, cginame=/MRlogin.pl
2004-11-08 10:06:13 cgi: runCGI(envp= ...
2004-11-08 10:06:13 cgi: runCGI (stderr):Can't open perl script
/opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi/MRlogin.pl: No such
file or directory 2004-11-08 10:06:13 cgi: runCGI: 1 lines received on
stderr

 -Original Message-
 From: Phillip Qin [mailto:[EMAIL PROTECTED] 
 Sent: Friday, November 05, 2004 5:20 PM
 To: 'Tomcat Users List'
 Subject: RE: CGI ...yeah, I know (Tomcat 4.1.29)
 
 
 Enable cgiservlet log (I usually set debug to 6) and see 
 what's output in the log (very detail).
 
 -Original Message-
 From: Mark Claassen [mailto:[EMAIL PROTECTED] 
 Sent: November 5, 2004 5:07 PM
 To: 'Tomcat Users List'
 Subject: CGI ...yeah, I know (Tomcat 4.1.29)
 
 
 I know that Tomcat is not an ideal CGI server, but I am 
 having real trouble getting it to work at all.  Most often I 
 get the Exception below, and it doesn't seem to be running 
 our perl program at all.  (We can run the perl program by 
 hand though).  We had a bit of trouble getting it setup in 
 the first place, and we got errors way different from this.  
 I figured that since we were getting this, we must have 
 everything else setup correctly.
 
 Looking at the 4.1.27 source this is:
 1686: commandsStdIn.flush();
   commandsStdIn.close();
 commandsStdIn is the output stream to the process.
 
 Anyone have any ideas on where to start looking?
 
 Thanks,
 Mark
 
 java.io.IOException: Broken pipe
 at java.io.FileOutputStream.writeBytes(Native Method)
 at java.io.FileOutputStream.write(FileOutputStream.java:257)
 at
 java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69)
 at 
 java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127)
 at 
 java.io.BufferedOutputStream.flush(BufferedOutputStream.java:128)
 at
 org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServl
 et.java:1686)
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 !DSPAM:418bf9fd252211451334454!
 



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



RE: CGI ...yeah, I know (Tomcat 4.1.29)

2004-11-08 Thread Mark Thomas
I think you have run into
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24478 

Sorry - this was entirely my fault and has since been fixed. To get around this
you can take the servlets-cgi.jar from an earlier/later release if you don't
want to upgrade your entire server.

Again, please accept my apologies.

Mark

 -Original Message-
 From: Mark Claassen [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 08, 2004 3:17 PM
 To: 'Tomcat Users List'
 Subject: RE: CGI ...yeah, I know (Tomcat 4.1.29)
 
 Thanks for the reply.  We have the debug set to 6 already.  
 We found that it
 almost seems to alternate with the following error.  The 
 script is there,
 accessible, and executable by the user tomcat is running as.  
 We are not
 using a security manager.  One puzzling thing is that the 
 following path has
 two sets of quotes, but I was thinking that was just an error 
 in the log
 message.  We altered the program so that the first line of the program
 touches a file so we can see if it ran at all.  It does not, 
 and we get
 either the No such file error or the Broken Pipe one.  
 Perhaps, though,
 the quotations are the crux of it all.
 
 In the localhost log we have:
 2004-11-08 10:06:13 cgi: findCGI:
 currentLoc=/opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi
 2004-11-08 10:06:13 cgi: findCGI:
 currentLoc=/opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi
 2004-11-08 10:06:13 cgi: findCGI: FOUND cgi at
 /opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi/MRlogin.pl
 2004-11-08 10:06:13 cgi: findCGI calc: name=MRlogin.pl,
 path=/opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi/MRlogin.pl,
 scriptname=/MRcgi/MRlogin.pl, cginame=/MRlogin.pl
 2004-11-08 10:06:13 cgi: runCGI(envp= ...
 2004-11-08 10:06:13 cgi: runCGI (stderr):Can't open perl script
 /opt/OCIEsys/tomcat/WEB/webapps/ROOT/WEB-INF/cgi/MRlogin.pl
: No such
 file or directory 2004-11-08 10:06:13 cgi: runCGI: 1 lines received on
 stderr
 
  -Original Message-
  From: Phillip Qin [mailto:[EMAIL PROTECTED] 
  Sent: Friday, November 05, 2004 5:20 PM
  To: 'Tomcat Users List'
  Subject: RE: CGI ...yeah, I know (Tomcat 4.1.29)
  
  
  Enable cgiservlet log (I usually set debug to 6) and see 
  what's output in the log (very detail).
  
  -Original Message-
  From: Mark Claassen [mailto:[EMAIL PROTECTED] 
  Sent: November 5, 2004 5:07 PM
  To: 'Tomcat Users List'
  Subject: CGI ...yeah, I know (Tomcat 4.1.29)
  
  
  I know that Tomcat is not an ideal CGI server, but I am 
  having real trouble getting it to work at all.  Most often I 
  get the Exception below, and it doesn't seem to be running 
  our perl program at all.  (We can run the perl program by 
  hand though).  We had a bit of trouble getting it setup in 
  the first place, and we got errors way different from this.  
  I figured that since we were getting this, we must have 
  everything else setup correctly.
  
  Looking at the 4.1.27 source this is:
  1686: commandsStdIn.flush();
commandsStdIn.close();
  commandsStdIn is the output stream to the process.
  
  Anyone have any ideas on where to start looking?
  
  Thanks,
  Mark
  
  java.io.IOException: Broken pipe
  at java.io.FileOutputStream.writeBytes(Native Method)
  at java.io.FileOutputStream.write(FileOutputStream.java:257)
  at
  
 java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69)
  at 
  java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127)
  at 
  java.io.BufferedOutputStream.flush(BufferedOutputStream.java:128)
  at
  org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServl
  et.java:1686)
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  !DSPAM:418bf9fd252211451334454!
  
 
 
 
 -
 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 ...yeah, I know (Tomcat 4.1.29)

2004-11-05 Thread Phillip Qin
Enable cgiservlet log (I usually set debug to 6) and see what's output in
the log (very detail).

-Original Message-
From: Mark Claassen [mailto:[EMAIL PROTECTED] 
Sent: November 5, 2004 5:07 PM
To: 'Tomcat Users List'
Subject: CGI ...yeah, I know (Tomcat 4.1.29)


I know that Tomcat is not an ideal CGI server, but I am having real trouble
getting it to work at all.  Most often I get the Exception below, and it
doesn't seem to be running our perl program at all.  (We can run the perl
program by hand though).  We had a bit of trouble getting it setup in the
first place, and we got errors way different from this.  I figured that
since we were getting this, we must have everything else setup correctly.

Looking at the 4.1.27 source this is:
1686: commandsStdIn.flush();
  commandsStdIn.close();
commandsStdIn is the output stream to the process.

Anyone have any ideas on where to start looking?

Thanks,
Mark

java.io.IOException: Broken pipe
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:257)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:128)
at
org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:1686)



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


!DSPAM:418bf9fd252211451334454!


RE: CGI-BIN - TOMCAT 4.1.29

2004-08-24 Thread Mark Thomas
What is the content of the perl script?

Mark 

 -Original Message-
 From: Marek Gimza [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 24, 2004 6:43 PM
 To: Tomcat Users List
 Subject: CGI-BIN - TOMCAT 4.1.29
 
 Hi,
 
 I would be grateful for some assistance 
 
 I have spent literrally 2 days trying to just a get a PERL or 
 even a shell 
 script to run from tomcat !!
 I have religously followed the steps to modify the web.xml 
 file, rename 
 the servlet-cgi.jar file and restart tomcat .
 When running the cgi script from my browser I get the 
 following errors in 
 the logfile:
 
 
 2004-08-23 12:55:12 cgi: findCGI calc: name=hello.pl, 
 path=/usr/www/tomcat/webapps/ROOT/WEB-INF/cgi/hello.pl, 
 scriptname=/cgi-bin/hello.pl, cginame=/hello.pl
 2004-08-23 12:55:12 cgi: runCGI(envp=[{HTTP_USER_AGENT=Mozilla/4.0 
 (compatible; MSIE 6.0; Windows NT 5.1), HTTP_ACCEPT_ENCODING=gzip, 
 deflate, REQUEST_METHOD=GET, AUTH_TYPE=, HTTP_ACCEPT_LANGUAGE=en-us, 
 SERVER_NAME=holy.atl.arrisi.com, SERVER_SOFTWARE=TOMCAT, 
 HTTP_HOST=holy.atl.arrisi.com, GATEWAY_INTERFACE=CGI/1.1, 
 X_TOMCAT_SCRIPT_PATH=/usr/www/tomcat/webapps/ROOT/WEB-INF/cgi/
 hello.pl, 
 REMOTE_ADDR=10.5.30.212, SERVER_PROTOCOL=HTTP/1.1, PATH_INFO=, 
 REMOTE_HOST=lptp-mgimza.client.arrisi.com, QUERY_STRING=, 
 HTTP_CONNECTION=Keep-Alive, SERVER_PORT=9090, 
 HTTP_COOKIE=JSESSIONID=83357C8CE0FF70F6677A619137FBA3A7, 
 CONTENT_TYPE=, 
 CONTENT_LENGTH=, SCRIPT_NAME=/cgi-bin/hello.pl, HTTP_ACCEPT=*/*, 
 REMOTE_USER=, REMOTE_IDENT=}], 
 command=/usr/www/tomcat/webapps/ROOT/WEB-INF/cgi/hello.pl)
 2004-08-23 12:55:12 cgi: runCGI (stderr):Can't open perl script 
 /usr/www/tomcat/webapps/ROOT/WEB-INF/cgi/hello.pl: No 
 such file or 
 directory
 2004-08-23 12:55:12 cgi: runCGI: 1 lines received on stderr
 2004-08-23 13:02:45 cgi: findCGI: path=/test.sh, 
 /usr/www/tomcat/webapps/ROOT/WEB-INF/cgi
 2004-08-23 13:02:45 cgi: findCGI: 
 currentLoc=/usr/www/tomcat/webapps/ROOT/WEB-INF/cgi
 2004-08-23 13:02:45 cgi: findCGI: 
 currentLoc=/usr/www/tomcat/webapps/ROOT/WEB-INF/cgi
 2004-08-23 13:02:45 cgi: findCGI: FOUND cgi at 
 /usr/www/tomcat/webapps/ROOT/WEB-INF/cgi/test.sh
 2004-08-23 13:02:45 cgi: findCGI calc: name=test.sh, 
 path=/usr/www/tomcat/webapps/ROOT/WEB-INF/cgi/test.sh, 
 scriptname=/cgi-bin/test.sh, cginame=/test.sh
 
 2004-08-23 13:02:45 cgi: runCGI(envp=[{HTTP_USER_AGENT=Mozilla/4.0 
 (compatible; MSIE 6.0; Windows NT 5.1), HTTP_ACCEPT_ENCODING=gzip, 
 deflate, REQUEST_METHOD=GET, AUTH_TYPE=, HTTP_ACCEPT_LANGUAGE=en-us, 
 SERVER_NAME=holy.atl.arrisi.com, SERVER_SOFTWARE=TOMCAT, 
 HTTP_HOST=holy.atl.arrisi.com, GATEWAY_INTERFACE=CGI/1.1, 
 X_TOMCAT_SCRIPT_PATH=/usr/www/tomcat/webapps/ROOT/WEB-INF/cgi/
 test.sh, 
 REMOTE_ADDR=10.5.30.212, SERVER_PROTOCOL=HTTP/1.1, PATH_INFO=, 
 REMOTE_HOST=lptp-mgimza.client.arrisi.com, QUERY_STRING=, 
 HTTP_CONNECTION=Keep-Alive, SERVER_PORT=9090, 
 HTTP_COOKIE=JSESSIONID=83357C8CE0FF70F6677A619137FBA3A7, 
 CONTENT_TYPE=, 
 CONTENT_LENGTH=, SCRIPT_NAME=/cgi-bin/test.sh, HTTP_ACCEPT=image/gif, 
 image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, 
 application/vnd.ms-powerpoint, application/msword, 
 application/x-shockwave-flash, */*, REMOTE_USER=, REMOTE_IDENT=}], 
 command=/usr/www/tomcat/webapps/ROOT/WEB-INF/cgi/test.sh)
 2004-08-23 13:02:45 cgi: runCGI (stderr):Can't open perl script 
 /usr/www/tomcat/webapps/ROOT/WEB-INF/cgi/test.sh: No such file or 
 directory
 2004-08-23 13:02:45 cgi: runCGI: 1 lines received on stderr
 
 
 I am sure that I have ommitted something ...
 
 cd /usr/www/tomcat/bin
 startup.sh -debug start
 Using CATALINA_BASE:   /usr/www/tomcat
 Using CATALINA_HOME:   /usr/www/tomcat
 Using CATALINA_TMPDIR: /usr/www/tomcat/temp
 Using JAVA_HOME:   /usr/j2se
 
 
 Somehow tomcat cannot find the path to the cgi script  !! 
 
 
 Kind Regards,
 Marek Gimza 
 



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



Re: CGI and exe

2004-08-17 Thread QM
On Tue, Aug 17, 2004 at 09:45:24AM +0100, Colin Hearn wrote:
: I am using tomcat 4 and would like to run an windows exe from within
: tomcat. The exe is to search a cds/isis bibliographic data store that we
: have.
: 
: I have followed the instructions from
: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/cgi-howto.html

CGI and running an executable within the server aren't always the
same thing.  In the former case, you're letting clients call the
executable when they hit a certain URL; in the latter, you're using the
excutable internally within Tomcat (Runtime#exec()) almost like a data
source.

I'm none too familiar with the Windows execution model so I can't say
whether Runtime#exec() will have any terrible overhead, etc; but there
are usually alternatives to calling an executable directly from Java.

Does this exe's vendor have an API, or web services addon, or some other
way to access the data without calling the exe directly?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



RE: CGI and exe

2004-08-17 Thread Colin Hearn
I wish it had, but unfortunately it does not. 

-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: 17 August 2004 14:34
To: Tomcat Users List
Subject: Re: CGI and exe

On Tue, Aug 17, 2004 at 09:45:24AM +0100, Colin Hearn wrote:
: I am using tomcat 4 and would like to run an windows exe from within
: tomcat. The exe is to search a cds/isis bibliographic data store that
we
: have.
: 
: I have followed the instructions from
: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/cgi-howto.html

CGI and running an executable within the server aren't always the
same thing.  In the former case, you're letting clients call the
executable when they hit a certain URL; in the latter, you're using the
excutable internally within Tomcat (Runtime#exec()) almost like a data
source.

I'm none too familiar with the Windows execution model so I can't say
whether Runtime#exec() will have any terrible overhead, etc; but there
are usually alternatives to calling an executable directly from Java.

Does this exe's vendor have an API, or web services addon, or some other
way to access the data without calling the exe directly?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.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 and exe

2004-08-17 Thread share-it!
Dear Dennis Dai,

Unfortunately, we have not been able to locate the program that you have inquired 
about in our database.  If you could 
provide us with a program identification number or the name of the program developer's 
company we would be happy to 
further research your inquiry. 

If however, the program that you have inquired about is not listed with our service, 
we would recommend that you visit 
our web site www.shareit.com and browse our catalog.  We are confident that among the 
over 70,000 programs listed with 
our service you will find a different program to suit your needs.

Let us know if we can be of further assistance.


Sincerely, 

Jason
Your share-it! team
__

share-it! - a service of digital river
http://www.shareit.com
__


Original Message Follows: 
-

I wish it had, but unfortunately it does not. 
-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: 17 August 2004 14:34
To: Tomcat Users List
Subject: Re: CGI and exe
On Tue, Aug 17, 2004 at 09:45:24AM +0100, Colin Hearn wrote:
: I am using tomcat 4 and would like to run an windows exe from within
: tomcat. The exe is to search a cds/isis bibliographic data store that
we
: have.
: 
: I have followed the instructions from
: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/cgi-howto.html
CGI and running an executable within the server aren't always the
same thing.  In the former case, you're letting clients call the
executable when they hit a certain URL; in the latter, you're using the
excutable internally within Tomcat (Runtime#exec()) almost like a data
source.
I'm none too familiar with the Windows execution model so I can't say
whether Runtime#exec() will have any terrible overhead, etc; but there
are usually alternatives to calling an executable directly from Java.
Does this exe's vendor have an API, or web services addon, or some other
way to access the data without calling the exe directly?
-QM
-- 
software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.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 for tomcat on linux

2004-08-13 Thread QM
On Fri, Aug 13, 2004 at 05:25:01PM -0700, Havens, Peter wrote:
: I did these same steps on both my Windows and my LINUX box but I keep
: getting an error 500 on my LINUX box.
: [snip]
: There error seems to imply that the cgi file that I am trying to run
: does not exist.  I have validated its location and the permissions to
: the file are wide open.
: 
: java.io.IOException: java.io.IOException:
: /opt/hpwebadmin/webapps/mxhelp/WEB-INF/cgi/namazucgi: not found

You say the perms are wide open on the file -- specifically, what are
they?  Is the file executable?

What's the first line of the script?  Is it

#!/path/to/your/perl

(where the path is /usr/bin/perl under most default Linux installs)

Windows and Linux execute scripts in different ways; the former
associates a file extension with an executable, whereas the latter sets
the interpreter in the script itself.

Try to run the script from the commandline.  If the executable
referenced by the magic number (aka shebang, aka #!) isn't there,
you'll get the file not found error.

I haven't run CGI under Tomcat 4 but I recall in Tomcat 5 you can
expressly state which interpreter to use in the Context element.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: CGI for tomcat on linux

2004-08-13 Thread Wade Chandler
Havens, Peter wrote:
Hello all,
I am trying to get CGI working on tomcat 4.1.29 in a RedHat Linux
environment.  I have all ready got it working on my Windows environment
and it is working great.  It seems to be quite easy and I followed the
instructions exactly as they are found here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/cgi-howto.html
I did these same steps on both my Windows and my LINUX box but I keep
getting an error 500 on my LINUX box.  I have included the exception
that I am seeing on the browser when I try to access my cgi executable.
I have tried many different executables and scripts but I always get the
same response.
There error seems to imply that the cgi file that I am trying to run
does not exist.  I have validated its location and the permissions to
the file are wide open.  

Has anyone run in to this before or do you know why I am getting this?
Thanks in advance,
-Peter
Below is the exception report


HTTP Status 500
type Exception report
message 

description The server encountered an internal error () that prevented
it from fulfilling this request.
exception 

java.io.IOException: java.io.IOException:
/opt/hpwebadmin/webapps/mxhelp/WEB-INF/cgi/namazucgi: not found
at java.lang.UNIXProcess.(Unknown Source)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at
org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:15
92)
at
org.apache.catalina.servlets.CGIServlet.doGet(CGIServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFi
lterChain.java:98)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterC
hain.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:172)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:494)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:
376)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at

Re: CGI not executing

2004-05-02 Thread Michael Eastwood
never mind, I solved my own problem.  I took the servlet config out of 
the global web.xml and stuck it into my ROOT web.xml and now it works.  
I noted that Tomcat was producing a cgi-bin mapping for all of my 
webapps, not just the root one as I'd intended.  Now that I recall that 
the global web.xml is defined for all webapps, it's clear, but it's 
placement there is, I think, a little weird, considering the behaviour 
produced is not of the conventional form (ie all cgi scripts under 
/cgi-bin instead of webapp1/cgi-bin, webapp2/cgi-bin, etc).

On 03/05/2004, at 12:10 PM, Michael Eastwood wrote:

Hi,

I'm having trouble executing a Perl CGI under Tomcat 5.0.19 standalone.

I've set up the global web.xml as per instructions in the CGI how-to, 
and renamed the appropriate jar file.  I've put my perl CGI scripts 
into the default /WEB-INF/cgi directory, and made sure they're 
executable.  I can run the scripts in that directory with ./script

When I go to /cgi-bin/script, however, my browser starts a download 
that blocks indefinitely.  My CPU goes up by around 10%, so something 
is happening, but no perl process appears in my process list and 
nothing ever arrives at the browser.

Any ideas?

-
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-bin

2004-03-05 Thread Shapira, Yoav

Hi,

- Root Cause -
java.lang.ClassNotFoundException:
org.apache.catalina.servlets.CGIServlet
snip/
I have servlets-cgi.jar in \jsp_files\WEB-INF\lib
snip/

Did you try the setup recommended in the CGI HOWTO?
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cgi-howto.html

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: cgi-bin

2004-03-04 Thread Shapira, Yoav

Hi,
What are the startup errors in your log that lead to the CHI servlet
marked as unavailable?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of George Hester
Sent: Wednesday, March 03, 2004 5:19 PM
To: [EMAIL PROTECTED]
Subject: Re: cgi-bin

OK.  servlets-cgi.jar is in \WEB-INF\lib.  This is in the web.xml and
only
this:

servlet
servlet-namecgi/servlet-name

servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-
class
init-param
  param-nameclientInputTimeout/param-name
  param-value100/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value6/param-value
/init-param
init-param
  param-namecgiPathPrefix/param-name
  param-valueWEB-INF/cgi/param-value
/init-param
 load-on-startup5/load-on-startup
/servlet

!-- The mapping for the CGI Gateway servlet --

servlet-mapping
servlet-namecgi/servlet-name
url-pattern/cgi-bin/*/url-pattern
/servlet-mapping

This is the test http://localhost/jsp_files/cgi-bin/up.cgi

This is the result:

HTTP Status 503 - Servlet cgi is currently unavailable

---

-

type Status report

message Servlet cgi is currently unavailable

description The requested service (Servlet cgi is currently
unavailable) is
not currently available.


---

-

Apache Tomcat/4.1.30
Any other suggestions?  Thanks.

--
George Hester
__
Tim Funk [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 You have the servlet declaration but you are missing the servlet
mapping.

 See conf/web.xml for an example/

 -Tim

 George Hester wrote:

  In my webapp in /WEB-INF/lib I put servlets-cgi.jar.  I then added
just
this to the web.xml in \WEB-INF
 
  servlet
  servlet-namecgi/servlet-name
  servlet-
classorg.apache.catalina.servlets.CGIServlet/servlet-class
  init-param
param-nameclientInputTimeout/param-name
param-value100/param-value
  /init-param
  init-param
param-namedebug/param-name
param-value6/param-value
  /init-param
  init-param
param-namecgiPathPrefix/param-name
param-valueWEB-INF/cgi/param-value
  /init-param
   load-on-startup5/load-on-startup
  /servlet
 
  Then I made a \cgi-bin folder and put a cgi file in there I know
works
over the web.  Call it test.cgi.  I then tried
 
  http://localhost/jsp-files/cgi-bin/test.cgi
 
  C\Inetpub\jsp-files
 
  The reuslt was the cgi code returned as a text file.  What did I do
wrong?  Can I get this to work?  ActiveState Perl is installed in
C:\Perl.
Is there a test different than what I have done to see if what I set up
works?  Thanks.
 


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: cgi-bin

2004-03-04 Thread George Hester
Yes Jean trouble is I cannot do that.  See I have a cgi-bin that is off the root of my 
Microsoft Internet Information Server.  So I cannot allow Tomcat to grab 
http://localhost/cgi-bin which is what will happen if I use the cgi-bin under Apache 
Group.  Tomcat doesn't have the cgi-bin in its uriworkermap.properties.  If it did it 
would grab the cgi-bin I use with IIS.

So I tried setting up a cgi-bin off a webapp I had made and is shown in the link I 
gave.  Can it be done in this fashion?  Thanks.

-- 
George Hester
__
Jean-Luc Duval [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 remove the jsp_file from the URL, it`s not in your cgi config
 url-pattern/cgi-bin/*/url-pattern then it seems it must look like
 
  http://localhost/cgi-bin/up.cgi
 
 JLD
 
 - Original Message -
 From: Tim Funk [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Wednesday, March 03, 2004 8:05 PM
 Subject: Re: cgi-bin
 
 
  Hmm. I am out of ideas (i don't use the cgi mod), hopefully catalina.out
 or
  the other logs have something insightful.
 
  -Tim
 
  George Hester wrote:
   OK.  servlets-cgi.jar is in \WEB-INF\lib.  This is in the web.xml and
 only this:
  
   servlet
   servlet-namecgi/servlet-name
  
 servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
   init-param
 param-nameclientInputTimeout/param-name
 param-value100/param-value
   /init-param
   init-param
 param-namedebug/param-name
 param-value6/param-value
   /init-param
   init-param
 param-namecgiPathPrefix/param-name
 param-valueWEB-INF/cgi/param-value
   /init-param
load-on-startup5/load-on-startup
   /servlet
  
   !-- The mapping for the CGI Gateway servlet --
  
   servlet-mapping
   servlet-namecgi/servlet-name
   url-pattern/cgi-bin/*/url-pattern
   /servlet-mapping
  
   This is the test http://localhost/jsp_files/cgi-bin/up.cgi
  
   This is the result:
  
   HTTP Status 503 - Servlet cgi is currently unavailable
  
 
  --
 --
  
   type Status report
  
   message Servlet cgi is currently unavailable
  
   description The requested service (Servlet cgi is currently unavailable)
 is not currently available.
  
  
 
  --
 --
 
 
  -
  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-bin

2004-03-04 Thread George Hester
 errors in your log that lead to the CHI servlet
marked as unavailable?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of George Hester
Sent: Wednesday, March 03, 2004 5:19 PM
To: [EMAIL PROTECTED]
Subject: Re: cgi-bin

OK.  servlets-cgi.jar is in \WEB-INF\lib.  This is in the web.xml and
only
this:

servlet
servlet-namecgi/servlet-name

servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-
class
init-param
  param-nameclientInputTimeout/param-name
  param-value100/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value6/param-value
/init-param
init-param
  param-namecgiPathPrefix/param-name
  param-valueWEB-INF/cgi/param-value
/init-param
 load-on-startup5/load-on-startup
/servlet

!-- The mapping for the CGI Gateway servlet --

servlet-mapping
servlet-namecgi/servlet-name
url-pattern/cgi-bin/*/url-pattern
/servlet-mapping

This is the test http://localhost/jsp_files/cgi-bin/up.cgi

This is the result:

HTTP Status 503 - Servlet cgi is currently unavailable

---

-

type Status report

message Servlet cgi is currently unavailable

description The requested service (Servlet cgi is currently
unavailable) is
not currently available.


---

-

Apache Tomcat/4.1.30
Any other suggestions?  Thanks.

--
George Hester
__
Tim Funk [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 You have the servlet declaration but you are missing the servlet
mapping.

 See conf/web.xml for an example/

 -Tim

 George Hester wrote:

  In my webapp in /WEB-INF/lib I put servlets-cgi.jar.  I then added
just
this to the web.xml in \WEB-INF
 
  servlet
  servlet-namecgi/servlet-name
  servlet-
classorg.apache.catalina.servlets.CGIServlet/servlet-class
  init-param
param-nameclientInputTimeout/param-name
param-value100/param-value
  /init-param
  init-param
param-namedebug/param-name
param-value6/param-value
  /init-param
  init-param
param-namecgiPathPrefix/param-name
param-valueWEB-INF/cgi/param-value
  /init-param
   load-on-startup5/load-on-startup
  /servlet
 
  Then I made a \cgi-bin folder and put a cgi file in there I know
works
over the web.  Call it test.cgi.  I then tried
 
  http://localhost/jsp-files/cgi-bin/test.cgi
 
  C\Inetpub\jsp-files
 
  The reuslt was the cgi code returned as a text file.  What did I do
wrong?  Can I get this to work?  ActiveState Perl is installed in
C:\Perl.
Is there a test different than what I have done to see if what I set up
works?  Thanks.
 


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: cgi-bin

2004-03-03 Thread Tim Funk
You have the servlet declaration but you are missing the servlet mapping.

See conf/web.xml for an example/

-Tim

George Hester wrote:

In my webapp in /WEB-INF/lib I put servlets-cgi.jar.  I then added just this to the web.xml in \WEB-INF

servlet
servlet-namecgi/servlet-name
servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
init-param
  param-nameclientInputTimeout/param-name
  param-value100/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value6/param-value
/init-param
init-param
  param-namecgiPathPrefix/param-name
  param-valueWEB-INF/cgi/param-value
/init-param
 load-on-startup5/load-on-startup
/servlet
Then I made a \cgi-bin folder and put a cgi file in there I know works over the web.  Call it test.cgi.  I then tried 

http://localhost/jsp-files/cgi-bin/test.cgi

C\Inetpub\jsp-files

The reuslt was the cgi code returned as a text file.  What did I do wrong?  Can I get this to work?  ActiveState Perl is installed in C:\Perl.  Is there a test different than what I have done to see if what I set up works?  Thanks.



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


Re: cgi-bin

2004-03-03 Thread George Hester
OK.  servlets-cgi.jar is in \WEB-INF\lib.  This is in the web.xml and only this:

servlet
servlet-namecgi/servlet-name
servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
init-param
  param-nameclientInputTimeout/param-name
  param-value100/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value6/param-value
/init-param
init-param
  param-namecgiPathPrefix/param-name
  param-valueWEB-INF/cgi/param-value
/init-param
 load-on-startup5/load-on-startup
/servlet

!-- The mapping for the CGI Gateway servlet --

servlet-mapping
servlet-namecgi/servlet-name
url-pattern/cgi-bin/*/url-pattern
/servlet-mapping

This is the test http://localhost/jsp_files/cgi-bin/up.cgi

This is the result:

HTTP Status 503 - Servlet cgi is currently unavailable



type Status report

message Servlet cgi is currently unavailable

description The requested service (Servlet cgi is currently unavailable) is not 
currently available.




Apache Tomcat/4.1.30
Any other suggestions?  Thanks.

-- 
George Hester
__
Tim Funk [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 You have the servlet declaration but you are missing the servlet mapping.
 
 See conf/web.xml for an example/
 
 -Tim
 
 George Hester wrote:
 
  In my webapp in /WEB-INF/lib I put servlets-cgi.jar.  I then added just this to 
  the web.xml in \WEB-INF
  
  servlet
  servlet-namecgi/servlet-name
  servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
  init-param
param-nameclientInputTimeout/param-name
param-value100/param-value
  /init-param
  init-param
param-namedebug/param-name
param-value6/param-value
  /init-param
  init-param
param-namecgiPathPrefix/param-name
param-valueWEB-INF/cgi/param-value
  /init-param
   load-on-startup5/load-on-startup
  /servlet
  
  Then I made a \cgi-bin folder and put a cgi file in there I know works over the 
  web.  Call it test.cgi.  I then tried 
  
  http://localhost/jsp-files/cgi-bin/test.cgi
  
  C\Inetpub\jsp-files
  
  The reuslt was the cgi code returned as a text file.  What did I do wrong?  Can I 
  get this to work?  ActiveState Perl is installed in C:\Perl.  Is there a test 
  different than what I have done to see if what I set up works?  Thanks.
 


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



Re: cgi-bin

2004-03-03 Thread Tim Funk
Hmm. I am out of ideas (i don't use the cgi mod), hopefully catalina.out or 
the other logs have something insightful.

-Tim

George Hester wrote:
OK.  servlets-cgi.jar is in \WEB-INF\lib.  This is in the web.xml and only this:

servlet
servlet-namecgi/servlet-name
servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
init-param
  param-nameclientInputTimeout/param-name
  param-value100/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value6/param-value
/init-param
init-param
  param-namecgiPathPrefix/param-name
  param-valueWEB-INF/cgi/param-value
/init-param
 load-on-startup5/load-on-startup
/servlet
!-- The mapping for the CGI Gateway servlet --

servlet-mapping
servlet-namecgi/servlet-name
url-pattern/cgi-bin/*/url-pattern
/servlet-mapping
This is the test http://localhost/jsp_files/cgi-bin/up.cgi

This is the result:

HTTP Status 503 - Servlet cgi is currently unavailable



type Status report

message Servlet cgi is currently unavailable

description The requested service (Servlet cgi is currently unavailable) is not currently available.




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


Re: cgi-bin

2004-03-03 Thread Jean-Luc Duval
remove the jsp_file from the URL, it`s not in your cgi config
url-pattern/cgi-bin/*/url-pattern then it seems it must look like

 http://localhost/cgi-bin/up.cgi

JLD

- Original Message -
From: Tim Funk [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, March 03, 2004 8:05 PM
Subject: Re: cgi-bin


 Hmm. I am out of ideas (i don't use the cgi mod), hopefully catalina.out
or
 the other logs have something insightful.

 -Tim

 George Hester wrote:
  OK.  servlets-cgi.jar is in \WEB-INF\lib.  This is in the web.xml and
only this:
 
  servlet
  servlet-namecgi/servlet-name
 
servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
  init-param
param-nameclientInputTimeout/param-name
param-value100/param-value
  /init-param
  init-param
param-namedebug/param-name
param-value6/param-value
  /init-param
  init-param
param-namecgiPathPrefix/param-name
param-valueWEB-INF/cgi/param-value
  /init-param
   load-on-startup5/load-on-startup
  /servlet
 
  !-- The mapping for the CGI Gateway servlet --
 
  servlet-mapping
  servlet-namecgi/servlet-name
  url-pattern/cgi-bin/*/url-pattern
  /servlet-mapping
 
  This is the test http://localhost/jsp_files/cgi-bin/up.cgi
 
  This is the result:
 
  HTTP Status 503 - Servlet cgi is currently unavailable
 

 --
--
 
  type Status report
 
  message Servlet cgi is currently unavailable
 
  description The requested service (Servlet cgi is currently unavailable)
is not currently available.
 
 

 --
--


 -
 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 servlet in tomcat

2004-01-12 Thread Martin Dengler
I've contacted the OP off-list to see if I can help as well.

On Fri, 2004-01-09 at 17:38, Tim Funk wrote:
 See the tomcat-dev and tomcat-user archives. There were some recent patches 
 to CGI Servlet and some discussions about it. I don't rember the specifics. 
 (Since I don't use cgi)
 
 Worst case scenario is you'll need to build from CVS or wait for the next 
 release depending on what was in those discussions.
 
 -Tim
 
 [EMAIL PROTECTED] wrote:
 
  Tim, 
  
  Thanks. I followed your instructions but I get the error CGI script not
  found or not specified.
  
  Any idea on what I should do? 
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


RE: CGI servlet in tomcat

2004-01-12 Thread Mark Thomas
For the current version of the CGI script the CGI scripts need to be in the
WEB-INF/cgi directory. They are then available via the /cgi-bin/ path. Also, the
webapp must be deployed in an expanded state.

ie: if you deploy myApp.war to the webapp directory containing
WEB-INF/cgi/myScript.cgi then you would access it with
http://tomcathost/myApp/cgi-bin/myScript.cgi

There is a bug in the current version that wraps the Perl command and parameters
in double quotes. This works fine with Windows but not much else (sorry - this
was my fault).

The various patches make the following changes:
- the double quote bug is fixed
- use of Perl is no longer mandatory, the name of the .exe can be configured
- you can use extension mapping and place cgi scripts anywhere you would place a
jsp file
- other minor stuff that escapes me (look in the archive if you really want to
know)

Of course, if you want these features you'll need to build from CVS or wait for
the next release.

Mark

-Original Message-
From: Martin Dengler [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 12, 2004 5:20 PM
To: Tomcat Users List
Subject: Re: CGI servlet in tomcat

I've contacted the OP off-list to see if I can help as well.

On Fri, 2004-01-09 at 17:38, Tim Funk wrote:
 See the tomcat-dev and tomcat-user archives. There were some recent patches 
 to CGI Servlet and some discussions about it. I don't rember the specifics. 
 (Since I don't use cgi)
 
 Worst case scenario is you'll need to build from CVS or wait for the next 
 release depending on what was in those discussions.
 
 -Tim
 
 [EMAIL PROTECTED] wrote:
 
  Tim, 
  
  Thanks. I followed your instructions but I get the error CGI script not
  found or not specified.
  
  Any idea on what I should do? 
  
 
 
 -
 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 servlet in tomcat

2004-01-09 Thread Tim Funk
You place the scripts in your webapp. For example, you should have a ROOT 
context in a default install under %CATALINA_HOME/webapps/ROOT. In there 
create a cgi-bin directory.

If you have other webapps - you can create subdirectories int here to. If you 
wish to forgo /cgi-bin/ you can map *.cgi to cgi by editing web.xml in any 
webapp or $CATALINA_HOME/conf/server.xml



-Tim

[EMAIL PROTECTED] wrote:

In the web.xml, I've uncommented the servlets ssi and cgi. I've also
-uncommented the servlets-mapping for these 2 servlets.
I've renamed the servlets-cgi.renametojar and servlets-ssi.renametojar
files.
Where do I place the folder cgi-bin? Are there any other changes to be made
to use the CGI servlet?


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


Re: CGI servlet in tomcat

2004-01-09 Thread annimandary
Tim, 

Thanks. I followed your instructions but I get the error CGI script not
found or not specified.

Any idea on what I should do? 



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



Re: CGI servlet in tomcat

2004-01-09 Thread Tim Funk
See the tomcat-dev and tomcat-user archives. There were some recent patches 
to CGI Servlet and some discussions about it. I don't rember the specifics. 
(Since I don't use cgi)

Worst case scenario is you'll need to build from CVS or wait for the next 
release depending on what was in those discussions.

-Tim

[EMAIL PROTECTED] wrote:

Tim, 

Thanks. I followed your instructions but I get the error CGI script not
found or not specified.
Any idea on what I should do? 



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


RE: CGI not working on Tomcat 5.0.16?

2003-12-17 Thread Januski, Ken
Thanks John, and good luck with Tomcat 5.

Ken

-Original Message-
From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:52 PM
To: Tomcat Users List
Subject: Re: CGI not working on Tomcat 5.0.16?


The only CGI that I tested with is a log analysis package called AWStats
(http://awstats.sourceforge.net/) which primarily consists of a single .pl
file. It also seems to use some .pm library files. It has always worked
great with Tomcat 4.1. I can't get it to work with Tomcat 5 though. I'm
hoping that someone will chime in and let me know if CGI works for them on
Tomcat 5.

Jon

- Original Message - 
From: Januski, Ken [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 12:51 PM
Subject: RE: CGI not working on Tomcat 5.0.16?


Jon,

Just slightly off topic, have you gotten cgi to do more or less what you
wanted with Tomcat? I can't get it working very well in Tomcat 4.1 and am
wondering if it's just me.

I can get one page to work but when it calls anohter cgi page I run into
problems.

Ken

-Original Message-
From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 1:04 PM
To: Tomcat Users List
Subject: Re: CGI not working on Tomcat 5.0.16?


Tomcat supports CGI natively. I'm using Tomcat in standalone mode.

Jon

- Original Message - 
From: Edson Alves Pereira [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 6:59 AM
Subject: RE: CGI not working on Tomcat 5.0.16?


Just a question, CGI isn´t a Apache server matter?

 --
 De: Jonathan Eric Miller[SMTP:[EMAIL PROTECTED]
 Responder: Tomcat Users List
 Enviada: segunda-feira, 15 de dezembro de 2003 20:52
 Para: Tomcat Users List
 Assunto: Re: CGI not working on Tomcat 5.0.16?

 Do you have the same error that I do in your log? As far as I can tell
 this
 is a bug in Tomcat.

 Jon

 - Original Message - 
 From: Lawrence, Gabriel [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, December 15, 2003 4:58 PM
 Subject: RE: CGI not working on Tomcat 5.0.16?


  I've noticed that on tomcat 5 the working directory that it execs the
  cgi script in is different then it was on tomcat 4. I haven't solved my
  problem yet, but I have isolated that to be my problem.
 
  -gabe
 
  -Original Message-
  From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 15, 2003 2:42 PM
  To: Tomcat User List
  Subject: CGI not working on Tomcat 5.0.16?
 
 
  I've been having problems getting CGI to work with Tomcat 5.0.16. I have
  it working with Tomcat 4.1. Has anyone else been able to get it to work?
 
  I'm receiving the following error in my localhost_log*.txt log even
  though the file listed is there. Has anyone else had this problem?
 
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open
  perl script
  /opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl:
  No such file or directory
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on
  stderr
 
  Jon
 
 
  -
  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 not working on Tomcat 5.0.16?

2003-12-16 Thread Edson Alves Pereira
Just a question, CGI isn´t a Apache server matter?

 --
 De:   Jonathan Eric Miller[SMTP:[EMAIL PROTECTED]
 Responder:Tomcat Users List
 Enviada:  segunda-feira, 15 de dezembro de 2003 20:52
 Para: Tomcat Users List
 Assunto:  Re: CGI not working on Tomcat 5.0.16?
 
 Do you have the same error that I do in your log? As far as I can tell
 this
 is a bug in Tomcat.
 
 Jon
 
 - Original Message - 
 From: Lawrence, Gabriel [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, December 15, 2003 4:58 PM
 Subject: RE: CGI not working on Tomcat 5.0.16?
 
 
  I've noticed that on tomcat 5 the working directory that it execs the
  cgi script in is different then it was on tomcat 4. I haven't solved my
  problem yet, but I have isolated that to be my problem.
 
  -gabe
 
  -Original Message-
  From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 15, 2003 2:42 PM
  To: Tomcat User List
  Subject: CGI not working on Tomcat 5.0.16?
 
 
  I've been having problems getting CGI to work with Tomcat 5.0.16. I have
  it working with Tomcat 4.1. Has anyone else been able to get it to work?
 
  I'm receiving the following error in my localhost_log*.txt log even
  though the file listed is there. Has anyone else had this problem?
 
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open
  perl script
  /opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl:
  No such file or directory
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on
  stderr
 
  Jon
 
 
  -
  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 not working on Tomcat 5.0.16?

2003-12-16 Thread Jonathan Eric Miller
Tomcat supports CGI natively. I'm using Tomcat in standalone mode.

Jon

- Original Message - 
From: Edson Alves Pereira [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 6:59 AM
Subject: RE: CGI not working on Tomcat 5.0.16?


Just a question, CGI isn´t a Apache server matter?

 --
 De: Jonathan Eric Miller[SMTP:[EMAIL PROTECTED]
 Responder: Tomcat Users List
 Enviada: segunda-feira, 15 de dezembro de 2003 20:52
 Para: Tomcat Users List
 Assunto: Re: CGI not working on Tomcat 5.0.16?

 Do you have the same error that I do in your log? As far as I can tell
 this
 is a bug in Tomcat.

 Jon

 - Original Message - 
 From: Lawrence, Gabriel [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, December 15, 2003 4:58 PM
 Subject: RE: CGI not working on Tomcat 5.0.16?


  I've noticed that on tomcat 5 the working directory that it execs the
  cgi script in is different then it was on tomcat 4. I haven't solved my
  problem yet, but I have isolated that to be my problem.
 
  -gabe
 
  -Original Message-
  From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 15, 2003 2:42 PM
  To: Tomcat User List
  Subject: CGI not working on Tomcat 5.0.16?
 
 
  I've been having problems getting CGI to work with Tomcat 5.0.16. I have
  it working with Tomcat 4.1. Has anyone else been able to get it to work?
 
  I'm receiving the following error in my localhost_log*.txt log even
  though the file listed is there. Has anyone else had this problem?
 
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open
  perl script
  /opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl:
  No such file or directory
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on
  stderr
 
  Jon
 
 
  -
  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 not working on Tomcat 5.0.16?

2003-12-16 Thread Januski, Ken
Jon,

Just slightly off topic, have you gotten cgi to do more or less what you
wanted with Tomcat? I can't get it working very well in Tomcat 4.1 and am
wondering if it's just me.

I can get one page to work but when it calls anohter cgi page I run into
problems.

Ken

-Original Message-
From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 1:04 PM
To: Tomcat Users List
Subject: Re: CGI not working on Tomcat 5.0.16?


Tomcat supports CGI natively. I'm using Tomcat in standalone mode.

Jon

- Original Message - 
From: Edson Alves Pereira [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 6:59 AM
Subject: RE: CGI not working on Tomcat 5.0.16?


Just a question, CGI isn´t a Apache server matter?

 --
 De: Jonathan Eric Miller[SMTP:[EMAIL PROTECTED]
 Responder: Tomcat Users List
 Enviada: segunda-feira, 15 de dezembro de 2003 20:52
 Para: Tomcat Users List
 Assunto: Re: CGI not working on Tomcat 5.0.16?

 Do you have the same error that I do in your log? As far as I can tell
 this
 is a bug in Tomcat.

 Jon

 - Original Message - 
 From: Lawrence, Gabriel [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, December 15, 2003 4:58 PM
 Subject: RE: CGI not working on Tomcat 5.0.16?


  I've noticed that on tomcat 5 the working directory that it execs the
  cgi script in is different then it was on tomcat 4. I haven't solved my
  problem yet, but I have isolated that to be my problem.
 
  -gabe
 
  -Original Message-
  From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 15, 2003 2:42 PM
  To: Tomcat User List
  Subject: CGI not working on Tomcat 5.0.16?
 
 
  I've been having problems getting CGI to work with Tomcat 5.0.16. I have
  it working with Tomcat 4.1. Has anyone else been able to get it to work?
 
  I'm receiving the following error in my localhost_log*.txt log even
  though the file listed is there. Has anyone else had this problem?
 
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open
  perl script
  /opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl:
  No such file or directory
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on
  stderr
 
  Jon
 
 
  -
  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 not working on Tomcat 5.0.16?

2003-12-16 Thread Jonathan Eric Miller
The only CGI that I tested with is a log analysis package called AWStats
(http://awstats.sourceforge.net/) which primarily consists of a single .pl
file. It also seems to use some .pm library files. It has always worked
great with Tomcat 4.1. I can't get it to work with Tomcat 5 though. I'm
hoping that someone will chime in and let me know if CGI works for them on
Tomcat 5.

Jon

- Original Message - 
From: Januski, Ken [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 12:51 PM
Subject: RE: CGI not working on Tomcat 5.0.16?


Jon,

Just slightly off topic, have you gotten cgi to do more or less what you
wanted with Tomcat? I can't get it working very well in Tomcat 4.1 and am
wondering if it's just me.

I can get one page to work but when it calls anohter cgi page I run into
problems.

Ken

-Original Message-
From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 1:04 PM
To: Tomcat Users List
Subject: Re: CGI not working on Tomcat 5.0.16?


Tomcat supports CGI natively. I'm using Tomcat in standalone mode.

Jon

- Original Message - 
From: Edson Alves Pereira [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 6:59 AM
Subject: RE: CGI not working on Tomcat 5.0.16?


Just a question, CGI isn´t a Apache server matter?

 --
 De: Jonathan Eric Miller[SMTP:[EMAIL PROTECTED]
 Responder: Tomcat Users List
 Enviada: segunda-feira, 15 de dezembro de 2003 20:52
 Para: Tomcat Users List
 Assunto: Re: CGI not working on Tomcat 5.0.16?

 Do you have the same error that I do in your log? As far as I can tell
 this
 is a bug in Tomcat.

 Jon

 - Original Message - 
 From: Lawrence, Gabriel [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, December 15, 2003 4:58 PM
 Subject: RE: CGI not working on Tomcat 5.0.16?


  I've noticed that on tomcat 5 the working directory that it execs the
  cgi script in is different then it was on tomcat 4. I haven't solved my
  problem yet, but I have isolated that to be my problem.
 
  -gabe
 
  -Original Message-
  From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 15, 2003 2:42 PM
  To: Tomcat User List
  Subject: CGI not working on Tomcat 5.0.16?
 
 
  I've been having problems getting CGI to work with Tomcat 5.0.16. I have
  it working with Tomcat 4.1. Has anyone else been able to get it to work?
 
  I'm receiving the following error in my localhost_log*.txt log even
  though the file listed is there. Has anyone else had this problem?
 
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open
  perl script
  /opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl:
  No such file or directory
  2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on
  stderr
 
  Jon
 
 
  -
  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 not working on Tomcat 5.0.16?

2003-12-15 Thread Lawrence, Gabriel
I've noticed that on tomcat 5 the working directory that it execs the
cgi script in is different then it was on tomcat 4. I haven't solved my
problem yet, but I have isolated that to be my problem.

-gabe

-Original Message-
From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 15, 2003 2:42 PM
To: Tomcat User List
Subject: CGI not working on Tomcat 5.0.16?


I've been having problems getting CGI to work with Tomcat 5.0.16. I have
it working with Tomcat 4.1. Has anyone else been able to get it to work?

I'm receiving the following error in my localhost_log*.txt log even
though the file listed is there. Has anyone else had this problem?

2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open
perl script
/opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl:
No such file or directory
2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on
stderr

Jon


-
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 not working on Tomcat 5.0.16?

2003-12-15 Thread Jonathan Eric Miller
Do you have the same error that I do in your log? As far as I can tell this
is a bug in Tomcat.

Jon

- Original Message - 
From: Lawrence, Gabriel [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, December 15, 2003 4:58 PM
Subject: RE: CGI not working on Tomcat 5.0.16?


 I've noticed that on tomcat 5 the working directory that it execs the
 cgi script in is different then it was on tomcat 4. I haven't solved my
 problem yet, but I have isolated that to be my problem.

 -gabe

 -Original Message-
 From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
 Sent: Monday, December 15, 2003 2:42 PM
 To: Tomcat User List
 Subject: CGI not working on Tomcat 5.0.16?


 I've been having problems getting CGI to work with Tomcat 5.0.16. I have
 it working with Tomcat 4.1. Has anyone else been able to get it to work?

 I'm receiving the following error in my localhost_log*.txt log even
 though the file listed is there. Has anyone else had this problem?

 2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open
 perl script
 /opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl:
 No such file or directory
 2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on
 stderr

 Jon


 -
 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 script not launching in Tomcat 5.0

2003-12-12 Thread Jonathan Eric Miller
I'm having the same exact problem. I think it might be a bug in Tomcat 5 as
I have it working no problem in Tomcat 4. For some reason the file name has
two sets of 's. Not sure if that might have something to do with it...

Jon

- Original Message - 
From: Li, William [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 10:13 AM
Subject: cgi script not launching in Tomcat 5.0


 Hi,

 I did the config as per the documentation for CGI.  I have a script
 /local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi and it works fine
on
 command line.  But Tomcat doesn't like it:

 2003-12-11 10:54:41 cgi: findCGI calc: name=printenv.cgi,
 path=/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi,
 scriptname=/cgi-bin/printenv.cgi, cginame=/printenv.cgi
 2003-12-11 10:54:41 cgi: runCGI(envp=[{CONTENT_TYPE=, SERVER_PORT=8080,
 REMOTE_ADDR=127.0.0.1, GATEWAY_INTERFACE=CGI/1.1, QUERY_STRING=,

X_TOMCAT_SCRIPT_PATH=/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi,
 REMOTE_HOST=127.0.0.1, SERVER_SOFTWARE=TOMCAT, PATH_INFO=, AUTH_TYPE=,
 SERVER_PROTOCOL=, REQUEST_METHOD=GET, REMOTE_USER=, REMOTE_IDENT=,
 SERVER_NAME=localhost.localdomain, CONTENT_LENGTH=,
 SCRIPT_NAME=/cgi-bin/printenv.cgi}],
 command=/local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi)
 2003-12-11 10:54:41 cgi: runCGI (stderr):Can't open perl script
 /local/0/home/tomcat/webapps/ROOT/cgi-bin/printenv.cgi: No such file
or
 directory
 2003-12-11 10:54:41 cgi: runCGI: 1 lines received on stderr

 Can anyone help?  Thanks!


 --

 This message is intended only for the personal and confidential use of the
 designated recipient(s) named above.  If you are not the intended
recipient of
 this message you are hereby notified that any review, dissemination,
 distribution or copying of this message is strictly prohibited.  This
 communication is for information purposes only and should not be regarded
as
 an offer to sell or as a solicitation of an offer to buy any financial
 product, an official confirmation of any transaction, or as an official
 statement of Lehman Brothers.  Email transmission cannot be guaranteed to
be
 secure or error-free.  Therefore, we do not represent that this
information is
 complete or accurate and it should not be relied upon as such.  All
 information is subject to change without notice.


 -
 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 Configuration-Problems

2003-11-16 Thread Shamik Bandopadhyay

Hey Albrecht...infact I posted similar cgi related issue couple of times in
this grp,but apparently no one seemed to have an answerI'm stuck with
this problem for a while,I've done a lot of RD,but I guess,this problem
remainslooks like its not possible to run CGI in standalone Tomcatit
runs when u add an apache sever to itpls let me know if u've figured out
any solution

-Original Message-
From: Albrecht Scheidig [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: CGI Configuration-Problems


Hi there,

I have to integrate a third-party cgi interface into my stand alone
tomcat environment.

The cgi-directory has to be located at d:\programs\vendor\cgi-bin.
The tomcat root is d:\foo\bar\tomcat. The host app base is ../../ and
I have defined a context in server.xml like this:
Context path= docBase=htdocs /

Also the cgi interface requires some aliases:
/vendor d:\programs\vendor\staticcontent
/vendor/cgi-bin d:\programs\vendor\cgi-bin

The problem is that tomcat does not accept .. in paths to cgi (see
exception below) and that I cannot configure an additional context
Context path=/cognos docBase=d:\programs\vendor\staticcontent /
because this interferes with the url-pattern for cgi-servlet.

Does anyone knows how I can achieve this? BTW: Accessing that cgi
interface using Apache with some aliases works fine. Is it difficult to
run Apache (for cgi processing) and Tomcat (for servlet-processing) on
the same port?

In my conf/web.xml I configured:
  servlet
servlet-namecgi/servlet-name

servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
init-param
  param-nameclientInputTimeout/param-name
  param-value100/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value6/param-value
/init-param
init-param
  param-namecgiPathPrefix/param-name
  param-value../../programs/vendor/cgi-bin/param-value
/init-param
 load-on-startup5/load-on-startup
   /servlet

  servlet-mapping
servlet-namecgi/servlet-name
url-pattern/vendor/cgi-bin/*/url-pattern
  /servlet-mapping

When requesting /vendor/cgi-bin/cgi.exe the request returns 0 bytes and
status code 200. In the localhost.log  I see:

2003-11-14 14:26:25 cgi: findCGI: path=/login.exe,
D:\foo\bar\tomcat\..\..\htdocs\../../programs/vendor/cgi-bin
2003-11-14 14:26:25 cgi: findCGI:
currentLoc=d:\foo\bar\tomcat\..\..\htdocs\..\..\programs\vendor\cgi-bin
2003-11-14 14:26:25 cgi: findCGI:
currentLoc=d:\foo\bar\tomcat\..\..\htdocs\..\..\programs\vendor\cgi-bin
2003-11-14 14:26:25 cgi: findCGI: FOUND cgi at
d:\foo\bar\tomcat\..\..\htdocs\..\..\programs\vendor\cgi-bin\login.exe
2003-11-14 14:26:25 cgi: findCGI calc: name=login.exe,
path=d:\foo\bar\tomcat\..\..\htdocs\..\..\programs\vendor\cgi-bin\login.
exe, scriptname=/cognos/cgi-bin\login.exe, cginame=\login.exe
2003-11-14 14:26:25 cgi: runCGI(envp=[{CONTENT_TYPE=, SERVER_PORT=80,
REMOTE_ADDR=127.0.0.1, GATEWAY_INTERFACE=CGI/1.1, QUERY_STRING=,
X_TOMCAT_SCRIPT_PATH=d:\foo\bar\tomcat\..\..\htdocs\..\..\programs\vendo
r\cgi-bin\login.exe, REMOTE_HOST=127.0.0.1, SERVER_SOFTWARE=TOMCAT,
PATH_INFO=, AUTH_TYPE=, SERVER_PROTOCOL=HTTP/0.9, REQUEST_METHOD=GET,
REMOTE_USER=, REMOTE_IDENT=, SERVER_NAME=localhost, CONTENT_LENGTH=,
SCRIPT_NAME=/cognos/cgi-bin\login.exe}],
command=d:\foo\bar\tomcat\..\..\htdocs\..\..\programs\vendor\cgi-bin\log
in.exe)
2003-11-14 14:26:25 StandardWrapperValve[cgi]: Servlet.service() for
servlet cgi threw exception
java.io.IOException:
org.apache.catalina.servlets.CGIServlet$CGIRunnerIllegal Character in
CGI command path ('.' or '..') detected.  Not running CGI
[d:\foo\bar\tomcat\..\..\htdocs\..\..\programs\vendor\cgi-bin\login.exe]
.
at
org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:15
33)
at
org.apache.catalina.servlets.CGIServlet.doGet(CGIServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

Best regards,
Albrecht


-
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 scripts

2003-07-07 Thread Susan Hoddinott
Hi,

I don't know if this is too simple an answer to your question but it is
similar to what I have been trying to do and I have discovered that they can
be referenced in the all the same ways as a normal http address, e.g.
anchors, etc. (e.g. http://localhost/directory/cgiscriptname.   If you need
something more complicated then look at URLConnection and HttpURLConnection.
You effectively simulate a servlet GET request by opening an input stream on
the connection but you may need to use URLEncode for the parameters.

Regards,
Susan Hoddinott
http://www.hexworx.com

- Original Message -
From: harsh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 07, 2003 4:02 PM
Subject: CGI scripts



 Hi can i run cgi scripts too through apache
 if yes then how and where to place them ?

 --

 harsh
 http://www.cse.iitb.ac.in/~harsh
 --




 -
 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-bin

2003-02-28 Thread Reynir Hübner
You need to create a new directory named cgi-bin (or something else if you 
configured web.xml to use something else) under your WEB-INF/ directory of the webapp.

Then you can put your cgi scripts in to that directory, and run from command line.

Hope it helps
-reynir


 -Original Message-
 From: Kaps Stefan [mailto:[EMAIL PROTECTED] 
 Sent: 28. febrúar 2003 13:18
 To: [EMAIL PROTECTED]
 Subject: cgi-bin
 
 
 hello!
 i need a cgi-bin directory and enabled cgi in the web.xml and 
 renamed a file. should this create a new directory when 
 restarting (not on my server...)? need help for this problem!
 
 Thanks!!
 stefan
 
 -
 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]




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
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 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 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
Other possible solution attempts include an env-entry/ tag in web.xml or 
an Environment/ 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 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 env-entry/ tag in web.xml or
 
 an Environment/ 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 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
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 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
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
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.11content-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 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 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
(servlet-classcom.mycomp.servlets.MyCGIServlet/servlet-class).  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.11content-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


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

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.11content-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

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 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 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
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 FORM entry empty with TOMCAT standalone

2002-08-26 Thread Stephan Orme

See earlier postings on CGI's I don't think included CGI's work in Tomcat
Standalone. I haven't been able to confirm this. Here's my earlier post:

I'm using Tomcat 4.0.4 to serve dynamic and static pages. I can get includes
to work and I can get CGI's to work but I can't get included CGI's to work.
you can pick your friends, you can pick your nose...
Anyway, here's what works:

includes on .html pages:
!--#include virtual=Shared/footer--

includes on .jsp pages:
%@ include file=Shared/footer %

CGI that works:
http://localhost/PCW/cgi-bin/test-cgi

And here's what DOESN'T work (this is on a .html page)
!--#include virtual=/cgi-bin/test-cgi--
!--#include virtual=/PCW/cgi-bin/test-cgi--
!--#include virtual=../../WEB-INF/cgi/test-cgi--

My Tomcat config file is completely standard - I uncommented the SSI and CGI
bits and renamed the appropriate .jar files but there are no other config
changes. Since both CGI's and includes work my assumption here is that the
SSI servlet doesn't call the CGI servlet. In other words when I call the CGI
from the URL it gets handled by the CGI servlet, and when I include it it
gets handled by the SSI servlet but what I need is for the SSI servlet to
call the CGI servlet which it doesn't do.

Or I could just be making all this up. Anyone want to set me straight? Or,
even better, just tell me how to make it work. I've a lot of trouble using
Tomcat with Apache so I'd prefer to avoid that route and go with a straight
Tomcat solution if at all possible.  TIA, steve



 Hi,
 
 I Need to integrate some current CGI with an new Java Application.
 So i have installed CGI in Tomcat 4.0.4 standalone and i want not use Apache.
 
 CGI is running BUT I CAN'T receive FORM DATA. ?
 my variable $keywords is empty.
 
 I have also tried it with an Apache Standalone and that is Ok.
 I suppose some problem with  CGI ReadParse function.
 
 Anyone have an idea ??
 
 Thanks
 Philippe
 
 
 



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




Re: CGI newbie question

2002-08-20 Thread steve orme

Phillipe, a lot of people are having problems getting CGI's to work, See the
other thread on this topic. I've gotten in to partially work and will post
my config settings tomorrow morning (can't do it from work). - steve


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




Re: cgi perl script and tomcat...

2002-06-27 Thread Liam Morley

Tomcat does, but it's not turned on by default. You want to look in your 
$CATALINA_HOME/conf/web.xml; search for the word CGI, and you should 
come upon the section you're looking for.

Liam Morley


Hoang C. Truong wrote:

Hi everyone,
Does tomcat support cgi perl?  How do I configure and
how do I kick off the cgi script from my web browser?

Thanks,

-Hoang

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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



  




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




Re: cgi perl script and tomcat...

2002-06-27 Thread Hoang C. Truong

Thanks Liam for your quick respond,
Yes,  I saw the section you mentioned and uncommented
it.  
Now I would like to create webapp testcgi that has
hello.cgi script in it.  How would I do that in term
of  what directory do I need to create?  And how would
I access hello.cgi from a browser?
Thanks for your help.

-Hoang


--- Liam Morley [EMAIL PROTECTED] wrote:
 Tomcat does, but it's not turned on by default. You
 want to look in your 
 $CATALINA_HOME/conf/web.xml; search for the word
 CGI, and you should 
 come upon the section you're looking for.
 
 Liam Morley
 
 
 Hoang C. Truong wrote:
 
 Hi everyone,
 Does tomcat support cgi perl?  How do I configure
 and
 how do I kick off the cgi script from my web
 browser?
 
 Thanks,
 
 -Hoang
 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
   
 
 
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: cgi perl script and tomcat...

2002-06-27 Thread Hoang C. Truong

I got it.  I just need to put it in the root of my
webapp and access it as
http://localhost:8080/testcgi/cgi-bin/hello.cgi

Thanks,

-Hoang


--- Hoang C. Truong [EMAIL PROTECTED]
wrote:
 Thanks Liam for your quick respond,
 Yes,  I saw the section you mentioned and
 uncommented
 it.  
 Now I would like to create webapp testcgi that has
 hello.cgi script in it.  How would I do that in term
 of  what directory do I need to create?  And how
 would
 I access hello.cgi from a browser?
 Thanks for your help.
 
 -Hoang
 
 
 --- Liam Morley [EMAIL PROTECTED] wrote:
  Tomcat does, but it's not turned on by default.
 You
  want to look in your 
  $CATALINA_HOME/conf/web.xml; search for the word
  CGI, and you should 
  come upon the section you're looking for.
  
  Liam Morley
  
  
  Hoang C. Truong wrote:
  
  Hi everyone,
  Does tomcat support cgi perl?  How do I configure
  and
  how do I kick off the cgi script from my web
  browser?
  
  Thanks,
  
  -Hoang
  
 
 __
  Do You Yahoo!?
  Yahoo! - Official partner of 2002 FIFA World Cup
  http://fifaworldcup.yahoo.com
  
  --
  To unsubscribe, e-mail:  
 
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
  

  
  
  
  
  --
  To unsubscribe, e-mail:  
 
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
 
 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: cgi perl script and tomcat...

2002-06-27 Thread Liam Morley

yep:) it's stored on your hard drive wherever you have cgiPathPrefix set 
to... and you access it within your browser wherever you have the cgi 
servlet-mapping set to.

Liam Morley

Hoang C. Truong wrote:

I got it.  I just need to put it in the root of my
webapp and access it as
http://localhost:8080/testcgi/cgi-bin/hello.cgi

Thanks,

-Hoang


--- Hoang C. Truong [EMAIL PROTECTED]
wrote:
  

Thanks Liam for your quick respond,
Yes,  I saw the section you mentioned and
uncommented
it.  
Now I would like to create webapp testcgi that has
hello.cgi script in it.  How would I do that in term
of  what directory do I need to create?  And how
would
I access hello.cgi from a browser?
Thanks for your help.

-Hoang


--- Liam Morley [EMAIL PROTECTED] wrote:


Tomcat does, but it's not turned on by default.
  

You


want to look in your 
$CATALINA_HOME/conf/web.xml; search for the word
CGI, and you should 
come upon the section you're looking for.

Liam Morley


Hoang C. Truong wrote:

  

Hi everyone,
Does tomcat support cgi perl?  How do I configure


and
  

how do I kick off the cgi script from my web


browser?
  

Thanks,

-Hoang



__
  

Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:  


mailto:[EMAIL PROTECTED]


For additional commands, e-mail:


mailto:[EMAIL PROTECTED]
  


 




--
To unsubscribe, e-mail:  

  

mailto:[EMAIL PROTECTED]


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

  

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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





__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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



  




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




Re: cgi-bin

2002-05-03 Thread James Williamson

It all depends what Tomcat/Apache connector you're
using, by default you can't stop requests being redirected
to Tomcat using mod_webapp, although you can with jk.

Regards, 

James Williamson
www.nameonthe.net
UK Tomcat Hosting

- Original Message - 
From: Ken Anderson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, May 03, 2002 12:26 AM
Subject: Re: cgi-bin


 kidding?
 um... rewrite them as servlets, or reinstall apache.
 Ken
 
 
 Oki DZ wrote:
  Hi,
  
  I replaced Apache with Tomcat; problem is, what should I do so that 
  these cgi scripts could get executed...?
  
  Thanks in advance,
  Oki
  
  -- 
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
  
  
  
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: cgi-bin

2002-05-03 Thread August Detlefsen

Implement the CGIServlet. 

In $CATALINA_HOME/conf/web.xml, uncomment: 

  servlet
servlet-namecgi/servlet-name
   
servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class
init-param
  param-nameclientInputTimeout/param-name
  param-value100/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value6/param-value
/init-param
init-param
  param-namecgiPathPrefix/param-name
  param-valueWEB-INF/cgi/param-value
/init-param
 load-on-startup5/load-on-startup
   /servlet

There are configuration comments in web.xml for how to set the params. 

One caveat: The CGIServlet only works with GET requests, not POST.

-August



--- James Williamson [EMAIL PROTECTED] wrote:
 It all depends what Tomcat/Apache connector you're
 using, by default you can't stop requests being redirected
 to Tomcat using mod_webapp, although you can with jk.
 
 Regards, 
 
 James Williamson
 www.nameonthe.net
 UK Tomcat Hosting
 
 - Original Message - 
 From: Ken Anderson [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, May 03, 2002 12:26 AM
 Subject: Re: cgi-bin
 
 
  kidding?
  um... rewrite them as servlets, or reinstall apache.
  Ken
  
  
  Oki DZ wrote:
   Hi,
   
   I replaced Apache with Tomcat; problem is, what should I do so
 that 
   these cgi scripts could get executed...?
   
   Thanks in advance,
   Oki
   
   -- 
   To unsubscribe:  
 mailto:[EMAIL PROTECTED]
   For additional commands:
 mailto:[EMAIL PROTECTED]
   Troubles with the list:
 mailto:[EMAIL PROTECTED]
   
   
   
  
  
  
  --
  To unsubscribe:  
 mailto:[EMAIL PROTECTED]
  For additional commands:
 mailto:[EMAIL PROTECTED]
  Troubles with the list:
 mailto:[EMAIL PROTECTED]
  
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: cgi-bin

2002-05-02 Thread Ken Anderson

kidding?
um... rewrite them as servlets, or reinstall apache.
Ken


Oki DZ wrote:
 Hi,
 
 I replaced Apache with Tomcat; problem is, what should I do so that 
 these cgi scripts could get executed...?
 
 Thanks in advance,
 Oki
 
 -- 
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: cgi-bin and tomcat4

2002-01-07 Thread huangzh

Hi :
 why not try the Apache server ?Tomcat is the Java Container and can run as part 
of Apache .

- Original Message - 
From: Thor Tall [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 07, 2002 4:50 PM
Subject: cgi-bin and tomcat4


 Hi,
 
 I would like to be able to run a few old C cgi
 programs together with my servlets, but I can not find
 any documentation on how to configure a cgi-bin
 directory under tomcat4.
 
 Could you please point me to the doc. or tell me how I
 can configure tomcat4 to handle cgi programs.
 
 Thanks a lot,
 Thor.
 
 
 __
 Do You Yahoo!?
 Send FREE video emails in Yahoo! Mail!
 http://promo.yahoo.com/videomail/
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 



Re: cgi-bin

2000-12-07 Thread Craig R. McClanahan

Pierre Roy wrote:

 Yes, I thought one could handle cgi-bin with Tomcat. Apparently I can either
 install Apache or call my .exe files from a servlet.


You've got it right.  Note that if your .exe program expects to be called as a
CGI script, you will need to set the environment variables defined by the CGI
specification prior to invoking the program.  This means you'll be doing about
80% of a general purpose servlet to support CGI scripts in Tomcat stand-alone.

If anyone wants to write and contribute a such a servlet that supports CGI
scripts, I would be happy to include it in the standard Tomcat distribution.


 Thank you all for helpful information.
 Pierre


Craig McClanahan



RE: cgi-bin

2000-12-05 Thread CPC Livelink Admin


As has been mentioned earlier on this list, Tomcat does not have any CGI
capabilities.  This could, however, be implemented in a servlet.  A general
call went out to see if anyone was interested in writing one, but I did not
see any takers.

To implement what you want to work, you will need to place tomcat behind
another web server like apache or iis.  Then you can use them to do your
cgi, and tomcat to handle your servlets.

Regards,
Paul


-Original Message-
From: Pierre Roy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 05, 2000 09:24 AM
To: [EMAIL PROTECTED]
Subject: Re: cgi-bin


I have installed a Web search engine (namely Subject Search Server v1.1).
This software directs search requests to
http://localhost:8080/cgi-bin/SSServer.exe
Therefore there is no .class nor .jsp file to be accessed !

- Original Message -
From: "Peter Choe" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 05, 2000 3:11 PM
Subject: Re: cgi-bin


 you don't put the .exe files anywhere.  you would put the .class files
 or the .jsp files in tomcat/webapps/your_application_directory

  Pierre Roy wrote:
 
  Hi there,
 
  I'm running Tomcat on Windows 2000.  When I try to load
  http://localhost:8080/cgi-bin I get a "page not found message" from my
  browser.  Could someone tell me where I should put my .exe files, and
  how I should configure Tomcat to find them?
 
  Thanks in advance,
  Pierre





Re: CGI-Wrapper for Tomcat?

2000-11-30 Thread Craig R. McClanahan

Karsten Hahn wrote:

 Hi all,

 I'm wondering if there is a Servlet that wraps (and hide) a old
 CGI-scripts.

 Thanks a lot,

 Karsten

There is not such a servlet in any current distribution of Tomcat.  If someone
wanted to write one, I'd certainly be willing to include it.

Craig McClanahan