Ok. So I did everything you said. Still not working. I get a 404 error. So I took it step by step to see if I made typos or something. If I go to http://host:port I see the directory listing including "myapp" I click on myapp. There is nothing in the directory listing. I then add "/cgi-bin/script.cgi" to the end, to make http://host:port/myapp/cgi-bin/script.cgi. Same result: 404. I then tried http://host:port/myapp/script.cgi. Same result. I then tried http://host:port/myapp/WEB-INF/cgi/script.cgi. This time it asked me if I want to open or download this file. <shrug> Any ideas? Thanks. --Alex
Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -----Original Message----- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 4:15 PM To: Tomcat Users List Subject: Re: Trouble getting CGI script to execute OK. Making progress. Can you try the following? (all steps included - even the ones you have already done) Once it works we can tweak it to give the configuration you want. These steps assume a default install. Create a directory $CATALINA_HOME/webapps/myapp/ Create a directory $CATALINA_HOME/webapps/myapp/WEB-INF Create a directory $CATALINA_HOME/webapps/myapp/WEB-INF/cgi Place your script called (script.cgi) in: $CATALINA_HOME/webapps/myapp/WEB-INF/cgi Uncomment the cgi stuff in $CATALINA_HOME/conf/web.xml Rename $CATALINA_HOME/server/servlets-cgi.renametojar to $CATALINA_HOME/server/servlets-cgi.jar Restart tomcat. Browse to http://host:port/myapp/cgi-bin/script.cgi Let me know what happens. Mark Brelsfoard, Alex wrote: > This is one area I was not entirely sure about. I did uncomment > everything and did NOT change anything. > I do not really have a ROOT url. I setup a "/cgi-bin" directory in > server.xml. I then created a WEB-INF and cgi folders and placed my > script in there. > So the path to the file is /path/cgi-bin/WEB-INF/cgi/script.cgi > And the URL: domain.com/cgi-bin/script.cgi Did I miss something here? > Thanks. > --Alex > > > Alex Brelsfoard > Web Applications Developer > Web Development Office > Worcester Polytechnic Institute > 508-831-6147 > [EMAIL PROTECTED] > > -----Original Message----- > From: Mark Thomas [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 08, 2005 3:55 PM > To: Tomcat Users List > Subject: Re: Trouble getting CGI script to execute > > Exactly where did you put your script? If you follow > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cgi-howto.html and use > the defaults it is impossible to see the text of your script. > > Assuming you only uncommented the global web.xml and did not edit any > of the settings, your script should be in: > /WEB-INF/cgi/ > > and it is accessed through > /yourcontext/cgi-bin/yourscript.cgi > > Mark > > > Brelsfoard, Alex wrote: > >>I have been reading all the online documentation I can dig up and >>cannot find the solution to my problem. >>Quite simply, all I want to do is be able to run perl cgi script >>through my Tomcat server. I uncommented everything having to do with >>CGI in the Tomcat web.xml conf file, restarted the server and placed >>my scriptmin the right place. All that happens now is the script is >>printed up to the screenjust like a txt file. It is executable. I >>checked the logs and the log says that a 304 code is sent to the browser. >>ANY help would be much appreciated. >>Thanks very much. >>--Alex >> >> >>Alex Brelsfoard >>Web Applications Developer >>Web Development Office >>Worcester Polytechnic Institute >>508-831-6147 >>[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]