Ticket #676 ( Closed )

Short Description Server-side includes supported?
Entered By: Michael - Charleston When: 2001-02-07 10:58:55 Build: 2.0.11B GA
Categories Type: Question   Department: Product   Category: Not Categorized
Description
Had a situation come up where it would be very usefull 
to implement a server-side include, but is this supported in 
Screensurfer?

I added the line:

<!--#include virtual="/surfer/docs/CourtRosters/" 
file="header.inc" -->

to a html file I have residing in the 
"C:\Screensurfer\HostServer\docs\CourtRosters" directory 
named "NonJuryTrialRoster.shtml"

however, the include statement does seem to be getting 
interpreted . . .
Append By: WindSurfer  When: 2001-02-07 11:48:41  New Status: Pending Customer
Comment
It's not supported at this time--we would implement it as a 
TEMACRO probably, like:

<TEMACRO IncludeFile "expression">

Where expression is a physical path to the file...

We are in the process of implementing some file read/write 
functionality--might get this in, but don't hold your 
breath!

For now, make a copy of the file into a .stml file, and put 
a <TESECTION body> at the top and </TESECTION> at the 
bottom, then you can do a <TESHOW header.body>...I know 
that is sensitive and a maintenance issue...but it will at 
least be quick and easy.
Append By: Michael - Charleston  When: 2001-02-07 12:16:38  New Status: Pending IE
Comment
Hmmm . . well, actually since this page is in the docs 
directory and with the rest of the "static" site pages, I 
was hoping to do this without SurferScript but if I have to, 
so be it.  See I have 2 separate files, one generated and 
ftp'ed by the mainframe nightly, and the other pretty much 
static, that need to be combined into a single web page.  
Without SSI it seems my remaining 2 options are frames or a 
/SURFER/UserDefinedTransaction URL command . . .
Append By: WindSurfer  When: 2001-02-07 12:23:08  New Status: Pending Customer
Comment
Can you put the guts of the generated file into javascript 
objects, then it can be loaded into a top-level invisible 
frame and made available to the rest of your document.
Append By: Michael - Charleston  When: 2001-02-07 12:30:00  New Status: Closed
Comment
Worth a try, thanks!
Append By: WindSurfer  When: 2001-02-07 12:37:44  New Status: Pending Customer
Comment
Actually, another thought--if you have an IIS webserver 
handy, you can merge any content through it, using the 
sessionkey.

You need the Screensurfer ASP component installed on the 
IIS machine (simple install)-- then you include a call to 
screensurfer--

<%Set SS = Server.CreateObject("SSurfer.AspRequest")
  SS.AddInput "info1",Request.Info1 
  SS.AddInput "info2",Request.info2 
  Set SS.Sessionkey=Request.sessionkey
  SS.Execute "mytran"
 %>

Your SS object now has "something" in it--back at SS, you 
can do:

<TERESULT type="HTML" name="PageData">
lots of STML, calls, whatever
</TERESULT>

Back in the ASP page, you can, at any time do:

<%=SS.Field("PageData")%>

And all the contents that SS put-out is displayed in the 
ASP page...

This isn't really a recommendation, just wanted to point-
out another alternative...
Append By: Michael - Charleston  When: 2001-02-07 16:40:06  New Status: Closed
Comment
OR . . . as I finally ended up doing it, by creating a 
"JavaScript client-side include" by utilizing the SRC 
attribute of the <SCRIPT> tag to document.write the text 
from a .js file.