| | |
running Perl/CGI scripts under Tomcat server
![]() |
Hi,
I have problem running my cgi scripts under Apache Tomcat server. I am
using Apache Tomcat/5.5.20 on WinXP. I followed the instruction tips I
found out at
http://www.wellho.net/forum/Perl-Pro...rl-CGI-scripts...
http://www.ftponline.com/javapro/200...den_03_18_03/p...
but still I could not get the scripts running.
I get HTTP status 404 error.
The directory structure I have is (Please ignore the line break)
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps
\examples #
this is folder I created it
\WEB-INF #
this is folder I created it
\cgi
# this is folder I created it
------> script1.cgi
------> script2.cgi
The script runs perfectly on Apache HTTPD server. Can any one tell me
clearly what needs to be done to get my script running.
Thank you,
Regards,
kath
I have problem running my cgi scripts under Apache Tomcat server. I am
using Apache Tomcat/5.5.20 on WinXP. I followed the instruction tips I
found out at
http://www.wellho.net/forum/Perl-Pro...rl-CGI-scripts...
http://www.ftponline.com/javapro/200...den_03_18_03/p...
but still I could not get the scripts running.
I get HTTP status 404 error.
The directory structure I have is (Please ignore the line break)
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps
\examples #
this is folder I created it
\WEB-INF #
this is folder I created it
\cgi
# this is folder I created it
------> script1.cgi
------> script2.cgi
The script runs perfectly on Apache HTTPD server. Can any one tell me
clearly what needs to be done to get my script running.
Thank you,
Regards,
kath
•
•
•
•
Hi,
I have problem running my cgi scripts under Apache Tomcat server. I am
using Apache Tomcat/5.5.20 on WinXP. I followed the instruction tips I
found out at
http://www.wellho.net/forum/Perl-Pro...rl-CGI-scripts...
http://www.ftponline.com/javapro/200...den_03_18_03/p...
but still I could not get the scripts running.
I get HTTP status 404 error.
The directory structure I have is (Please ignore the line break)
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps
\examples #
this is folder I created it
\WEB-INF #
this is folder I created it
\cgi
# this is folder I created it
------> script1.cgi
------> script2.cgi
The script runs perfectly on Apache HTTPD server. Can any one tell me
clearly what needs to be done to get my script running.
Thank you,
Regards,
kath
Hi,
I got it. The mistake I was doing was I was keeping the cgi folder in separate folder(examples) under webapps.
I need to keep the cgi/*.cgi in
../webapps/ROOT/WEB-INF folder.
But I don't know why server looks only in ROOT, might be default.
How can make server understand that the Perl/CGI scripts are kept in separate drive:/folder?
Thank you,
Regards,
kath.
Last edited by katharnakh; Feb 20th, 2007 at 2:26 am.
•
•
Join Date: Jun 2008
Posts: 2
Reputation:
Solved Threads: 0
Hi,
I'm new to Perl, I installed ActivePerl in my machine and it is running properly. But when I'm trying to open a CGI using Tomcat I'm getting HTTP Status 404 error.
This is the directory I created C:\apache-tomcat-6.0.10\webapps\ROOT\WEB-INF\cgi and in the cgi folder I have a file named hello.cgi
hello.cgi contains the following code:
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "<html><head>\n";
print "<title>Hello, world!</title></head>\n";
print "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#FF0000\" vlink=\"#800000\">\n";
print "<h1>Hello, world!</h1>\n";
print "<a href=\"../perl/tutorial.html\"><b>Back</b></a> to the Tutorial\n";
print "</body></html>\n";
Then I type http://localhost/hello.cgi in the browser I got HTTP Status 404 - /hello.cgi. The requested resource (/hello.cgi) is not available.
Can anyone help me regarding this problem
Thank you,
raj
I'm new to Perl, I installed ActivePerl in my machine and it is running properly. But when I'm trying to open a CGI using Tomcat I'm getting HTTP Status 404 error.
This is the directory I created C:\apache-tomcat-6.0.10\webapps\ROOT\WEB-INF\cgi and in the cgi folder I have a file named hello.cgi
hello.cgi contains the following code:
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "<html><head>\n";
print "<title>Hello, world!</title></head>\n";
print "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#FF0000\" vlink=\"#800000\">\n";
print "<h1>Hello, world!</h1>\n";
print "<a href=\"../perl/tutorial.html\"><b>Back</b></a> to the Tutorial\n";
print "</body></html>\n";
Then I type http://localhost/hello.cgi in the browser I got HTTP Status 404 - /hello.cgi. The requested resource (/hello.cgi) is not available.
Can anyone help me regarding this problem
Thank you,
raj
At best the url is just wrong, you left out the cgi folder in the path:
http://localhost/cgi/hello.cgi
At worst your server is not setup correctly, but I know nothing of Tomcat, which is not a perl topic anyway, but an http server question. The fact you can't run the perl script has nothing to do with perl, but with the server.
http://localhost/cgi/hello.cgi
At worst your server is not setup correctly, but I know nothing of Tomcat, which is not a perl topic anyway, but an http server question. The fact you can't run the perl script has nothing to do with perl, but with the server.
Last edited by KevinADC; Jun 24th, 2008 at 11:16 pm.
![]() |
Similar Threads
- 500 internal server error (*nix Software)
- C++ CGI Scripts (C++)
- difference between TOMCAT server and WEBLOGIC server (Java)
- Recommended Web Hosts (Web Hosting Deals)
Other Threads in the Perl Forum
- Previous Thread: Can you have any idea or algorithm about permutation of Keywords in Perl.
- Next Thread: Problem with phonebook -- hash
| Thread Tools | Search this Thread |





