WebSpeed Agent Error: Agent did not return an HTML page (6383)

subscripciones

New Member
.w code:

{&OUT} "<html><body>Hello World</body></html>"

Error Message:

WebSpeed error from messenger process (6019)
WebSpeed Agent Error: Agent did not return an HTML page (6383)

What am I doing wrong?

Thanks
 

FrancoisL

Member
Check your wsbroker1.server.log file in the work directory of your webspeed server. Your application generated an error and it should appear in that file.
 

webguy

Member
You forgot to end it with a period. Should work.
{&out} '<html><body>Hello World</body></html> ' skip.

Just to help some of you new to webspeed here are some tips taking the simple example of outputing "Hello World". I know from experience how frustrating it can be to get simple information like this from any source..even the progress manuals themselves. These examples are more for using embedded speedscript. (compiled html)

Say we have the following html document and I want to output "say Hello" I can do the following:

EXAMPLE A
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[URL]http://www.w3.org/TR/html4/loose.dtd[/URL]">
<html>
    <head>
        <title>My Title</title>
    </head>
    <body>
       {&out} '<strong>Hello World</strong>' skip.
    </body>
</html>

This just simply uses an out statement to output say hello with some strong tags same as <b>. No data being pulled from a db field or variable.
===================================================
Now lets say we want to do the same thing, but instead, I want to output "say hello" as a value from a variable. I can do the following:

EXAMPLE B
Code:
<script language="speedscript">
def var v-message    as char no-undo.
assign v-message = "Say Hello".
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[URL]http://www.w3.org/TR/html4/loose.dtd[/URL]">
<html>
    <head>
        <title>My Title</title>
    </head>
    <body>
      {&out} '<strong>' v-message '</strong>' skip.
    </body>
</html>

(Notice how I just create the string but the variable or any other db field value are not wrapped with a quote.)
====================================================
Now lets go a bit further. Doing {&out} for everything is a bit ugly and time consuming. Unless you are creating a string output in a function or procedure you do not have to use it. If we are using embedded speedscript we can use 4gl code in our html just like you can embed data
in PHP using echo or ASP using <% %>.

With webspeed I can do the same thing to just embed the value of a variable or any 4GL value. So I can just embed the value of a variable by using a back tic ``. Just like I'd use <% in asp as an example.

Note as Casper mentioned if you are familiar with ASP instead ot the bactick you can also use the familiar <%%>.

So knowing that I can do this.

Code:
<script language="speedscript">
def var v-message    as char no-undo.
assign v-message = "Say Hello".
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[URL]http://www.w3.org/TR/html4/loose.dtd[/URL]">
<html>
    <head>
        <title>My Title</title>
    </head>
    <body>
      <strong>`v-message`</strong>
    </body>
</html>

Cool eh. And you could have read 200 pages of the Progress manual and never get this information very clearly. Hope this helps. I know from experience it can be a pain just getting this simple info about developing with webspeed. Webspeed is very powerful and easy to work with if you know 4gl.

I may post some more examples to help some of you. Granted I am using embedded speedscript but honestly I dont know very many people that use the mapped object method. The trick is to use embedded speedscript, procedures, functions and includes so pieces are re-usable and you are seperating interface code (html) from logical code as best as possible. There are times where you need to whip out something for a simple piece and embedded speedscript is just fine. I also use jquery extensively with webspeed and that is a powerful combination. I recommend taking a look at jquery. You can easily use jquery with your webspeed projects especially to easily add ajax functionality, dom manipulation and other cool UI client side manipulation. You don't need 4gl to do that stuff.
 

Casper

ProgressTalk.com Moderator
Staff member
Just wanted to add something:
With embedded speedscript you can also use the <%%> and <%=%> tags.
That is more consistent with php and jsp for example. (and I don't like using the back tics ;-))

Casper.
 

webguy

Member
Just wanted to add something:
With embedded speedscript you can also use the <%%> and <%=%> tags.
That is more consistent with php and jsp for example. (and I don't like using the back tics ;-))

Casper.

Good point Casper. I just prefer the simpler backtic =)
 
Top