tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C F" <>
Subject RequestDispatcher.forward to CGI
Date Mon, 01 Jul 2002 05:50:42 GMT

I've been trying to use the following procedure to forward a request from my 
servlet to a CGI program within the same application space....

... which results in the following error....
"Servlet invoker is currently unavailable"

Looking at Sun's servlet tutorial, they indicate that this would be 

However, I did notice that Tomcat's documentation makes no mention of being 
able to forward requests in this manner to CGI... only other JSPs and 
servlets.  All I want is to pass the HTTP request to my CGI program via a 
servlet, the CGI program will respond with HTML and pass it back to the 
client browser via the servlet.  So I have a few questions...

1)  Has anybody been successful doing this? How?

2)  If it's not possible in the current Tomcat, is it something that might 
be available soon (I noticed that this release is Tomcat's first shot at CGI 

2)  If it is not possible to do this in Tomcat, can anybody think of another 
solution?  Response.sendRedirect is NOT an option.  The reason I'm 
attempting this is because I want to control access and input to my CGI 
program through a servlet.  I don't want the browser calling it directly.  
I'm thinking maybe the URLConnection class might be of use, but then I still 
have the issue of controlling access to it and maybe another performance 
hit.  Or maybe I'm wrong.  Ideas?

Tomcat 4.0.4 (standalone)
JDK 1.4
Redhat Linux 7.3


Chat with friends online, try MSN Messenger:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message