cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willie Wheeler" <>
Subject RE: My Producer worx only once...
Date Sun, 25 Jun 2000 23:17:41 GMT
Actually, it looks like it isn't doubling dummy like I thought, but just
adding the <b>...</b> and </body></html> every time you make a new
Still ill-formed though.


-----Original Message-----
From: Martin Sparenberg []
Sent: Sunday, June 25, 2000 5:19 PM
Subject: Fwd: My Producer worx only once...

Hello All,

as being new to cocoon, I tried implementing
an own producer, based on the "DummyProducer", comming as an example with
cocoon. For practicing purpose, I added some code to this class for
additional URL-parameters. When testing this producer with
this producer worked fine requesting the Document for the first time (after
restarting the httpd).
But every then comming request, I only get
"org.xml.sax.SAXParseException: The markup in the document following the
element must be well-formed.",
until I restart my httpd (/ my servletengine / cocoon).

I added the code to this mail - as you see, it's just the DummyProducer a
modified. BTW: that DummyProducer works well at every request...




public class TestProducer extends AbstractProducer implements Status {

    String dummy = "<?xml version=\"1.0\"?>"
        + "<?cocoon:format type=\"text/html\"?>"
        + "<html><body>"
        + "<h1 align=\"center\">"
            + "Hello from a dummy page"
        + "</h1>";
        // + "</body></html>";

    public Reader getStream(HttpServletRequest request) throws IOException {
        String para = request.getParameter( "media" );
        if ( para == null )
          para = new String( "stdBrowser" );
        dummy = dummy
              + "<b>Media: " + para + "</b>"
              + "</body></html>";
        return new StringReader(dummy);

    public String getPath(HttpServletRequest request) {
        return "";

    public String getStatus() {
        return "Test Producer";

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message