Inserting remote text into a .ssp

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Inserting remote text into a .ssp

Dennis smith-4
If I have a .ssp which shows among other things some
simple html text as say a paragraph, and if our client says
"please get that text from www.outclient.ca/abc/text.html"
how would I go about doing that -- dynamically at run time??

--
Dennis Smith                        [hidden email]
Cherniak Software Development Corporation       +1 905.771.7011
400-10 Commerce Valley Dr E                Fax: +1 905.771.6288
Thornhill, ON Canada L3T 7N7    http://www.CherniakSoftware.com

Reply | Threaded
Open this post in threaded view
|

Re: Inserting remote text into a .ssp

Mark Roberts
At 12:17 AM 10/17/2006, Dennis Smith wrote:
>If I have a .ssp which shows among other things some
>simple html text as say a paragraph, and if our client says
>"please get that text from www.outclient.ca/abc/text.html"
>how would I go about doing that -- dynamically at run time??

How about this?

<%
         [resp := HttpClient new executeRequest: (HttpRequest get:
'http://www.outclient.ca/abc/text.html').
         resp isSuccess
                 ifTrue: [response write: resp body sourceContents]]
             on: Error
             do: [:ex | ].
%>


Reply | Threaded
Open this post in threaded view
|

Re: Inserting remote text into a .ssp

Dennis smith-4
Looks interesting.  Any way I can do it from code in
a Tag class??

Mark D. Roberts wrote:

> At 12:17 AM 10/17/2006, Dennis Smith wrote:
>> If I have a .ssp which shows among other things some
>> simple html text as say a paragraph, and if our client says
>> "please get that text from www.outclient.ca/abc/text.html"
>> how would I go about doing that -- dynamically at run time??
>
> How about this?
>
> <%
>         [resp := HttpClient new executeRequest: (HttpRequest get:
> 'http://www.outclient.ca/abc/text.html').
>         resp isSuccess
>                 ifTrue: [response write: resp body sourceContents]]
>             on: Error
>             do: [:ex | ].
> %>
>
>

--
Dennis Smith                        [hidden email]
Cherniak Software Development Corporation       +1 905.771.7011
400-10 Commerce Valley Dr E                Fax: +1 905.771.6288
Thornhill, ON Canada L3T 7N7    http://www.CherniakSoftware.com

Reply | Threaded
Open this post in threaded view
|

Re: Inserting remote text into a .ssp

Dennis smith-4
Never mind -- of course I can, since that is all the <% stuff does.
Thanks.

Dennis Smith wrote:

> Looks interesting.  Any way I can do it from code in
> a Tag class??
>
> Mark D. Roberts wrote:
>> At 12:17 AM 10/17/2006, Dennis Smith wrote:
>>> If I have a .ssp which shows among other things some
>>> simple html text as say a paragraph, and if our client says
>>> "please get that text from www.outclient.ca/abc/text.html"
>>> how would I go about doing that -- dynamically at run time??
>>
>> How about this?
>>
>> <%
>>         [resp := HttpClient new executeRequest: (HttpRequest get:
>> 'http://www.outclient.ca/abc/text.html').
>>         resp isSuccess
>>                 ifTrue: [response write: resp body sourceContents]]
>>             on: Error
>>             do: [:ex | ].
>> %>
>>
>>
>

--
Dennis Smith                        [hidden email]
Cherniak Software Development Corporation       +1 905.771.7011
400-10 Commerce Valley Dr E                Fax: +1 905.771.6288
Thornhill, ON Canada L3T 7N7    http://www.CherniakSoftware.com