Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
execing a CGI to browser
nipper
On Win2K
have a perl script that generates HTML as a CGI. I want to (from an autorun) have it run the CGI in a browser. Cannot get it
quiet right.
tried:
"C:\Program Files\Internet Explorer\IEXPLORE.EXE" < andy.pl
"andy.pl | "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
and a couple others.
Again, Tips/Pointers/RTFMs appreciated
Andy
Find more posts tagged with
Comments
Migrateduser
CGI's normally require an HTTP server to execute. Since the browser is not the thing that processes the CGI, an HTTP server would be required. The HTTP server would need information about how to execute a perl program and would then pass the results from the perl program to the browser.
- Jason
nipper
Bummer, I was hoping I could have the perl script generate HTML and STDIO it to the browser. I can dump it to a
temp file & load that into a browser, but that seems like an extra step.
Migrateduser
That is essentially what a CGI program does. It (typically) writes HTML to stdout, and that output is rendered in the user's browser. (Additionally, it must write an HTTP response header.)
I don't know what else you are attempting to achieve.
Brinko Kobrin
Interwoven Staff Engineer
nipper
>That is essentially what a CGI program does. It (typically) writes HTML to stdout, and that output is rendered in the user's browser.
>(Additionally, it must write an HTTP response header.)
That is what I want to do, however I will not have a webserver running.
So I wanted (from a bat file) to run a CGI that would generate HTML and open a browser which would take
STDIN and render it.
Something like:
andy.ipl | C:\Program Files\Internet Explorer\IEXPLORE.EXE
(but that does not work)
Migrateduser
He's trying to do it without an HTTP Server. It's like dropping an executable, which prints "Hello World.", into notepad and expecting "Hello World." to show up in notepad. It won't. The binary code for the program will show up in Notepad. Same situation here.
- Jason
Migrateduser
So this is a Perl question that is completely independent of TeamSite, and you're running the "CGI" (Perl program) on the same Windows machine as the browser?
You could try writing the file to a temporary .html or .htm file, and then calling "open" on that file.
Brinko Kobrin
Interwoven Staff Engineer
nipper
Good analogy, on Unix it is usually easy (depending on how the app was written) where
applications can take input via STDIO or off of the command line.
Like I said, I know I can dump it to a file & Load the file, seems like extra woirk.
Migrateduser
I'd probably go with the write to temp file route. Unless you want to start a small HTTP server when the CD boots up.
- Jason