Toni:
 
I've done something exactly like this when interfacing to an OLAP web front-end, when I wanted to replace what their CGI program sent back with a more formatted/customized version on the way to the browser. I didn't use servlet chaining, just had a servlet that called the CGI, modified the content the way I wanted & sent it on to the browser. Worked great. I can forward you sample code off-list if you like.
 
Mike
Javacorporate Ltd
http://www.javacorporate.com
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Toni Grimm
Sent: Saturday, October 16, 1999 12:19 PM
To: [EMAIL PROTECTED]
Subject: How can a Servlet include content of a CGI

Hi all,
 
After searching the archives I'm still considering the following thing ...
 
Is it possible to include the generated content of a cgi-bin in a servlet and change this generated content?
 
The thing is ...
I have to develop a Security-Module for a Reporting-Tool (third-party, DataWarehouse). The reports are generated through a cgi-bin which is called (with a number of parameters) every time you hit any link on any generated page.
 
Now I'd like to replace all links to the cgi with a link to my servlet.
That means every time the user hits a link on any report my servlet gets involved and checks the requested URL against user rights (defined in a database). After this the servlet includes the content of the cgi (requested with a number of parameters) and replaces the links ...
 
Is URLConnection the right solution as mentioned by Markus Salchegger a few months ago? I did not find an answer to his question in the archive. Should I use as well a servlet chain for the replacement?
 
Any hints and design tips would be very much appreciated! Thanks in advance.
 
Toni
 

Reply via email to