The Generator is a generic object, i.e. it can process any stream out of the
POST message there are two ways to see StreamGenerator in action:
- To invoke URL http://localhost:8080/cocoon/Order
- To use telnet program to generate POST request
The first option is not a "pure" stream invocation, but it is quick way to
observe desired effects. The result of this invocation is a form containing
the XML document embedded in the textarea of the form. Submission of this
form will invoke StreamGenerator. The testarea name/value par is specified
as a parameter in the sitemap definition for the StreamGenerator. The expected
result is the submitted xml document send back to the browser.
The second or "pure" option of testing StreamGenerator "in action," requires the
use of Telnet program or any other process able to generate correct POST message.
The procedure is:
- To invoke telnet, connect to localhost 8080 and to use content of
telnet.txt file as a post message.
- Here, the Copy-Paste method should be used.
- Remember to hit the enter button twice enter after the contents of the post are set in telnet.
It is important because Content-len is calculated assuming two "enter" in the end of http message.
Once again, the performed task results in the mirror of the original document being sent back to the requestor.
The "pure" stream generation can be observed using the telnet utility where you can invoke a
message targeting my processing. Any other method is good (URL object connection) as
long the message is well formed.
 |  |  |
 |
<map:generate type="stream"/>
|  |
 |  |  |