
October 7th, 2008, 07:55 PM
| | | Possible to include SSI in ASP page using full URL?
Hi,
We want to include some SSI in our ASP pages, but where the SSI is
located on a different server, and so we need to be able to access the
SSI using a full URL, as opposed to a local file reference or relative
URL.
The "include" apparently doesn't allow this, so I was wondering if
anyone knows away to accomplish this?
Thanks!
Jim | 
October 7th, 2008, 10:25 PM
| | | Re: Possible to include SSI in ASP page using full URL?
Gazing into my crystal ball I observed ohaya <ohaya@cox.netwriting in
news:05602ba2-7183-4f00-86dd-fe654065286f@q26g2000prq.googlegroups.com: Quote:
Hi,
>
We want to include some SSI in our ASP pages, but where the SSI is
located on a different server, and so we need to be able to access the
SSI using a full URL, as opposed to a local file reference or relative
URL.
>
The "include" apparently doesn't allow this, so I was wondering if
anyone knows away to accomplish this?
>
Thanks!
>
Jim
>
| AFAIK, there is no way to do this other than XMLHTTP or maybe an Iframe
(frowned upon, however).
--
Adrienne Boswell at Home
Arbpen Web Site Design Services http://www.cavalcade-of-coding.info
Please respond to the group so others can share | 
October 8th, 2008, 01:55 AM
| | | Re: Possible to include SSI in ASP page using full URL?
Adrienne Boswell wrote: Quote:
Gazing into my crystal ball I observed ohaya <ohaya@cox.netwriting in
news:05602ba2-7183-4f00-86dd-fe654065286f@q26g2000prq.googlegroups.com:
> Quote:
>Hi,
>>
>We want to include some SSI in our ASP pages, but where the SSI is
>located on a different server, and so we need to be able to access the
>SSI using a full URL, as opposed to a local file reference or relative
>URL.
>>
>The "include" apparently doesn't allow this, so I was wondering if
>anyone knows away to accomplish this?
>>
>Thanks!
>>
>Jim
>>
| > AFAIK, there is no way to do this other than XMLHTTP or maybe an Iframe
(frowned upon, however).
>
|
Adrienne,
Thanks for the pointer re. XMLHttp. That *almost* did it, but
unfortunately, not quite :(...
I'm doing the XMLHttp call on the server-side, in an ASP page, and I was
able to GET the SSI using XMLHttp, but, the SSI includes links for
images and for css.
The images on the final page are appearing as "red X'es".
When I did view source on the final page, it looks like it's using my
hostname as the hostname in the URLs that it's using to GET the images.
In other words, the SSI has something like:
<IMG src="/icons/brand.gif"...
but on the final page served/view source it has:
<IMG src="http://myhost/icons/brand.gif"...
I can't really tell, but I think the same thing is happening with the
references/links for the css that is in the SSI that I'm getting.
Is there a way to resolve this problem?
Maybe in my ASP, I can parse the hostname part of the image and css URLs
before doing the Response.Write?
Would that work??
Any other ideas?
Jim | 
October 8th, 2008, 02:25 PM
| | | Re: Possible to include SSI in ASP page using full URL?
ohaya wrote: Quote:
Adrienne,
>
Thanks for the pointer re. XMLHttp. That *almost* did it, but
unfortunately, not quite :(...
>
I'm doing the XMLHttp call on the server-side, in an ASP page, and I
was able to GET the SSI using XMLHttp, but, the SSI includes links for
images and for css.
>
The images on the final page are appearing as "red X'es".
>
When I did view source on the final page, it looks like it's using my
hostname as the hostname in the URLs that it's using to GET the
images.
>
In other words, the SSI has something like:
>
<IMG src="/icons/brand.gif"...
>
but on the final page served/view source it has:
>
<IMG src="http://myhost/icons/brand.gif"...
>
I can't really tell, but I think the same thing is happening with the
references/links for the css that is in the SSI that I'm getting.
>
Is there a way to resolve this problem?
>
Maybe in my ASP, I can parse the hostname part of the image and css
URLs before doing the Response.Write?
>
| Do you have any control over that remote page so you can change those
relative links to absolute links? If not, you will have to parse and
replace the relative links with absolute links.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup. | 
October 9th, 2008, 03:55 PM
| | | Re: Possible to include SSI in ASP page using full URL?
Bob Barrows [MVP] wrote: Quote:
ohaya wrote: Quote:
>Adrienne,
>>
>Thanks for the pointer re. XMLHttp. That *almost* did it, but
>unfortunately, not quite :(...
>>
>I'm doing the XMLHttp call on the server-side, in an ASP page, and I
>was able to GET the SSI using XMLHttp, but, the SSI includes links for
>images and for css.
>>
>The images on the final page are appearing as "red X'es".
>>
>When I did view source on the final page, it looks like it's using my
>hostname as the hostname in the URLs that it's using to GET the
>images.
>>
>In other words, the SSI has something like:
>>
><IMG src="/icons/brand.gif"...
>>
>but on the final page served/view source it has:
>>
><IMG src="http://myhost/icons/brand.gif"...
>>
>I can't really tell, but I think the same thing is happening with the
>references/links for the css that is in the SSI that I'm getting.
>>
>Is there a way to resolve this problem?
>>
>Maybe in my ASP, I can parse the hostname part of the image and css
>URLs before doing the Response.Write?
>>
| >
Do you have any control over that remote page so you can change those
relative links to absolute links? If not, you will have to parse and
replace the relative links with absolute links.
>
|
Rob,
Sorry, I forgot to answer your question directly. "No", we don't have
direct control over the content in the SSI. The SSI content is under
control of a different group, and is a kind of centralized resource in
our organization.
Jim | 
October 9th, 2008, 04:25 PM
| | | Re: Possible to include SSI in ASP page using full URL?
ohaya wrote: Quote:
Rob,
>
Sorry, I forgot to answer your question directly. "No", we don't have
direct control over the content in the SSI. The SSI content is under
control of a different group, and is a kind of centralized resource in
our organization.
>
| No worries: I assumed that was the case given your decision to parse/edit
the urls.
--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM" | 
October 10th, 2008, 08:25 AM
| | | Re: Possible to include SSI in ASP page using full URL?
"ohaya" <ohaya@cox.netwrote in message
news:OURyiAqKJHA.4280@TK2MSFTNGP04.phx.gbl... Quote:
ohaya wrote:
>
I have:
> Quote:
<%
If value_found = True Then
Dim xml_header
Set xml_header = Server.CreateObject("Microsoft.XMLHTTP")
xml_header.Open "GET", value & "/ssi/header.ssi", False
xml_header.Send 'do the HTTP GET
Dim xyz_header
xyz_header = xml_header.responseText
Response.Write xml_header.responseText
| Response.flush Quote:
Set xml_header = Nothing
End If
| >
Hopefully, this'll continue to be consistent.
| Response.flush is changing the timing of delivery. Ordinarily
Response.Writes just fill a local buffer and only after the script is
finished is the entire buffer sent to the client. With Response.Flush you
are sending content earlier giving the browser a chance to render what has
been sent so far. However the final HTML delivered should be the same so
the browser ought to be presenting the same result.
BTW, You should not be using Microsoft.XMLHTTP in ASP, use
MSXML2.ServerXMLHTTP.3..0 which is designed to be used in such Server based
scenarios.
--
Anthony Jones - MVP ASP/ASP.NET | 
October 10th, 2008, 02:25 PM
| | | Re: Possible to include SSI in ASP page using full URL?
Anthony Jones wrote: Quote:
"ohaya" <ohaya@cox.netwrote in message
news:OURyiAqKJHA.4280@TK2MSFTNGP04.phx.gbl... Quote:
>ohaya wrote:
>>
>I have:
>> Quote:
<%
If value_found = True Then
Dim xml_header
Set xml_header = Server.CreateObject("Microsoft.XMLHTTP")
xml_header.Open "GET", value & "/ssi/header.ssi", False
xml_header.Send 'do the HTTP GET
>
Dim xyz_header
xyz_header = xml_header.responseText
Response.Write xml_header.responseText
| > Response.flush Quote:
Set xml_header = Nothing
End If
| >>
>Hopefully, this'll continue to be consistent.
| >
Response.flush is changing the timing of delivery. Ordinarily
Response.Writes just fill a local buffer and only after the script is
finished is the entire buffer sent to the client. With Response.Flush
you are sending content earlier giving the browser a chance to render
what has been sent so far. However the final HTML delivered should be
the same so the browser ought to be presenting the same result.
>
BTW, You should not be using Microsoft.XMLHTTP in ASP, use
MSXML2.ServerXMLHTTP.3..0 which is designed to be used in such Server
based scenarios.
>
|
Anthony,
Thanks. We'll take a look at MSXML2.ServerXMLHTTP.
Jim |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over network members.
|