Solved

Inserting CGI's output into an HTML page

Posted on 1999-01-14
7
268 Views
Last Modified: 2013-11-18
I have an HTML page containing a reference to a CGI/Servlet. I would like the CGI/Servlet to be activated while loading the HTML and its output added (inserted) into the page at the place where the CGI/Servlet reference is. This output of the CGI is another HTML text which must be parsed by the browser. I think that the ILAYER tag is doing what I want but the ILAYER is not standard and not supported by MS IE.
0
Comment
Question by:ariefishler
7 Comments
 

Expert Comment

by:jrsjr
Comment Utility
Could you have the CGI servlet do its processing and then output the entire page at the end of execution?  That way you could insert the text you wanted to insert.
0
 
LVL 4

Expert Comment

by:martinag
Comment Utility
SSI (Server Side Includes):
<!-- #exec cgi="..." -->

I don't know if this will work with servlets tho.
Also, it's possible that you'll have to rename the file to *.stm / *.stml

Martin
0
 

Expert Comment

by:DavidME
Comment Utility
Martin, the extension for HTML processed at the server is .shtml, isn't it?

I don't know about ILAYER but MSIE (>=4.0?) understands <IFRAME FRAMEBORDER="NO" SCROLLING="NO" SRC="/cgi-bin/theCGI.cgi">Code for non-IE browsers</IFRAME>

The most straightforward solution is that of jrsjr. If you don't want to recode the CGI, just split the .html and make a shell script:

cat header.html
/cgi-bin/theCGI.cgi <pass the parameters>
cat footer.html

but if the CGI generates a full HTML file with <HTML><BODY>...</BODY></HTML>, this won't work.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:ariefishler
Comment Utility
Maybe there is something I am missing but I can't see how jrsjr's solutions solves the problem. The whole process must be initiated by calling for a URL to an html page. In that html there must be a sort of TAG (the answer I am looking for) which activates a Servlet(CGI). The Servlet's result will be html which will be processed by the browser. This is exactly what ILAYER does !
0
 

Expert Comment

by:DavidME
Comment Utility
Then it is either ILAYER or IFRAME.
0
 

Author Comment

by:ariefishler
Comment Utility
DavidME.....I will accept it..:) Just send it as an answer  
0
 

Accepted Solution

by:
DavidME earned 100 total points
Comment Utility
MSIE (>=4.0?) understands
<IFRAME FRAMEBORDER="NO" SCROLLING="NO" SRC="/cgi-bin/theCGI.cgi">Code for
     non-IE browsers</IFRAME>

 Other interesting attributes are ALIGN, BORDERCOLOR; HEIGHT, TITLE, WIDTH. Check a MSIExplorer HTML reference for details.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now