• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

newbie question - tomcat

 
Sanjay Anand
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic