Solved

Inserting CGI's output into an HTML page

Posted on 1999-01-14
7
274 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 

Expert Comment

by:jrsjr
ID: 1841676
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
ID: 1841677
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
ID: 1841678
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ariefishler
ID: 1841679
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
ID: 1841680
Then it is either ILAYER or IFRAME.
0
 

Author Comment

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

Accepted Solution

by:
DavidME earned 100 total points
ID: 1841682
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

734 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