aspose file tools
The moose likes Servlets and the fly likes newbie question - tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "newbie question - tomcat" Watch "newbie question - tomcat" New topic

newbie question - tomcat

Sanjay Anand
Ranch Hand

Joined: Apr 03, 2001
Posts: 42
we're using a tomcat server and the servlets are very easy to reference. we just use "servlet/servletname" in the html ref.
but, now, i'm trying to call a servlet located in a cgi-bin because i need the servlet to execute a perl script located there. so i put the address: "/local/cgi-bin/blah/blah/servletname" but it won't run it.
what to do?
any help or pointers appreciated.

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12913
Tomcat follows the servlet API 2.2 and JSP API 1.1 - the servlet API has a very strict description of how the web.xml file is used to configure servlets and the directory structure that is required. Download those APIs from, study the web.xml that comes with Tomcat.
Incidently what you are trying to do won't work. The Tomcat JVM considers the "logged in" directory to be TOMCAT_HOME\bin - to address that CGI script you will need an absolute address of the perl script. Also - the Environment that a servlet exposes to an exec-ing process is not the same Environment that your Perl CGI is used to seeing.

author of:
Have you tried LearnNowOnline?
subject: newbie question - tomcat