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.

I also did the following

Altered Tomcat's C:\apache-tomcat-6.0.10\conf\web.xml file

a) There's a CGIServlet that's commented out; so I removed the comments for lines

b) Associate URLs cgi-bin with the CGI Servlet.
Then 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:
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 "</body></html>\n";

I tried all these urls
http://localhost/hello.cgi in the browser
I got HTTP Status 404 - /hello.cgi. The requested resource (/hello.cgi) is not available.

Can anyone please tell me what I'm doing wrong
Thank you,

First you need to go through this thread, in my opinion. As Kevin was replying to your earlier post it is nothing to do with Perl as such, only thing you need to place the scripts in right place so that you can call those scripts in browser.

The error status 404(requested resource not available)the error is exactly what is going to pop up because the resource you are requesting cannot be found by server.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.