File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "newbie question - tomcat" Watch "newbie question - tomcat" New topic
Author

newbie question - tomcat

Sanjay Anand
Ranch Hand

Joined: Apr 03, 2001
Posts: 42
hi,
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.

sanjay
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12760
    
    5
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 java.sun.com, 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.
Bill

------------------
author of:
 
jQuery in Action, 2nd edition
 
subject: newbie question - tomcat
 
Similar Threads
Invoke JSP? JSDK2.1 & TomCat?
Tomcat + Apache mod_jk PUT gives 405
Problem getting Servlets to work correctly with Tomcat
TOMCAT - Path to GIF files
Tomcat