Hello

I have Tomcat 5.0.27 with java 1.6.0_05-b13 on Win2003. Tomcat has a couple of webapps running but these are not my concern. My problem has to do with some static web pages which don't belong to a webapp. They are simply a bunch of static pages that you can see on http://foo.site.com/dir1/boo1.html http://foo.site.com/dir1/boo2.html etc. The pages are located in $CATALINA_HOME/webapps/ROOT/dir1 . In order to automate some tasks concerning these static pages I use a perl script [1] [2]. Now, I would like to execute this script by visiting the link http://foo.site.com/dir1/script.cgi

I have followed the instructions in http://tomcat.apache.org/tomcat-5.5-doc/cgi-howto.html . I edited $CATALINA_BASE/conf/web.xml and uncommented the cgi stuff. But since I want the script to be inside $CATALINA_HOME/webapps/ROOT/dir1 I changed cgiPathPrefix to dir1/ . I also changed cgi servlet-mapping from /cgi-bin/* to *.cgi

When I go to http://foo.site.com/dir1/ I see the directory listing and the script.cgi . However when I visit http://foo.site.com/dir1/ I get a 404 - The requested resource () is not available.

So, I would really like some help on this simple issue. What should be my parameters in confs/web.xml in order to execute the script which is found in $CATALINA_HOME/webapps/ROOT/dir1 , when I visit the link http://foo.site.com/dir1/script.cgi [2]?

Regards
Vangelis

[1] I know that since I use tomcat, I should be using a servlet to do the perl script's job. But I don't know how to write servlets so I wrote a perl script that I know how to write... I am totally new with Tomcat and jsp... I simply want to do this task done :)


[2] The script I want to run is of the form

#!/usr/local/bin/perl
open (MYFILE, ">>a_file_inside_ROOT_/_dir1")
        or die $!;
print MYFILE "Blah Blah\n";
close (MYFILE);


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to