Java PageBox 
 New PageBox 
 Other products 



The demo has three goals:

  1. To demonstrate the simplicity of archive deployment with PageBox architecture
  2. To provide a way to check your archive in a validation environment (Solaris, Tomcat 3.2).
  3. To present Cocoon and SOAP support.


You need to have an archive to publish. This archive can be either a .war or a .jar.

  • If it is a .war, it must have the same organization as described in Servlet specification. However JSPservlet doesn’t read web.xml. So it provides no support for servlet name mapping.
  • For .jar archive, please refer to examples in step section below.

This archive can includes resources such as serialized data, images and html pages, Servlets and compiled JSPs. To compile your JSPs for the demo, you must use Tomcat precompiler.

To test your archive before publish it, I recommend you to download Tomcat 3.2.1 from


  1. Install JDK 1.3 if needed. You can download it from
  2. Download PublisherClient from here
  3. Include PublisherClient archive on your CLASSPATH
  4. Check if JSPservletDemo is subscribing. Go to JSPservletDemo/publish.

    Servlet displaying PageBoxes that subscribe the repository

  5. Starts PublisherClient with java PublisherClient/PublisherClient. You should get that display:

    Selection of the repository at publish time

    The location where to publish the archive is already set.

  6. Select the archive. A file chooser is displayed:

    Selection of the Web archive at publish time

    Once you have selected your archive, click on publish button.

  7. The screen is updated:

    Success of Web archive publish

  8. You can check publication on server side with this URL: You should get a display like this:

    Servlet showing the log of the Web archive publish

  9. You can also check the current subscription/publication status that should have been updated.

    Servlet showing the status of publish, subscribe and deployment

  10. For demo purpose your archive has been published on the same location as it was published. So you can check your archive is published with You should something like:

    PageBox servlet showing the deployed Web archives

    You can also look at the log with and at the stats with

  11. You can look at repository status with JSPservletDemo/archiveList.

    Repository servlet showing the published Web archives

  12. Suppose your archive is a jar named myArchive containing a servlet myPath/myServlet.class, you can invoke it with You can also include images and html files in your archive. In this case, you must reference them with the proper extension, for instance if you included myPath/myPage.html in your jar archive, you can reference it as

Cocoon and SOAP demo

  1. Presentation

    We deployed on this site the environment presented on Cocoon/SOAP support

    Its main figure is

    Cocoon Web archive deployed in PageBox and calling a Web service

    So support archives on the diagram are Cocoon and SOAP plus their prerequisites. To simplify the demo, we included SOAP server support. Therefore the demo acts both as a presentation and a set of web services.

    We deployed two archives:

    • demo to illustrate the use of network processors and web services
    • samples - a copy of Cocoon 1.8.2 samples to illustrate publishing capabilities of Cocoon

  2. Demo

    Enter You should get this form:

    Invocation of an XML producer stored in a Cocoon Web archive

    Query is whatever you want. It is a string sent to the web service.
    Url is the web service URL, to invoke the embedded loopback server.
    After you clicked on submit, you should get this:

    Display of the XML document generated by an HTTP Web service processor

    What happend behind the curtain?
    1. first.htm is an HTML page stored as a resource in demo archive. When you clicked on submit, you made a request to demo.xml.
    2. As demo.xml had an XML suffix Cocoon was invoked to process it.
    3. Cocoon found that demo.xml was an XSP file - a sort of XML JSP. Cocoon compiled this demo.xml on the fly if needed and ran it.
    4. demo.xml produced an XML message using request parameters. Here as you selected HTTP protocol, demo.xml added a Processing instruction to the XML message indicating HTTP network processor should be used.
    5. Then Cocoon called the HTTP network processor with the XML message.
    6. The network processor processed the message and sent it to the loopback server.
    7. The network processor processed the loopback server response and merged it with the request. Then it added a Processing instruction to tell Cocoon to process the message next with the XML formatter.
    8. The formatter returned the XML message to the browser.

    Let's go back to the first.htm form.

    Invocation of an XML producer stored in a Cocoon Web archive

    Now select SOAP on the list. Url is the SOAP router URL, to invoke the embedded SOAP router. You can try calling it on your browser. You should get a message:
    Sorry, I don't speak via HTTP GET
    you have to use HTTP POST to talk to me.
    You shouldn't get this:

    Error XML document returned by a SOAP web service processor

    What happend when you get that message?
    The message contains an Error element with the rpcrouter message. The SOAP loopback service is not registered.

    You shouldn't get this error because we deployed the SOAP service with this command:
    java org.apache.soap.server.ServiceManagerClient deploy DeploymentDescriptor.xml
    DeploymentDescriptor.xml was defined like this:

    <?xml version="1.0"?> <isd:service xmlns:isd=""
      <isd:provider type="java"
        <isd:java class="loopback.loopbackSOAP"/>

    Here is what you should get:

    XML document returned by a SOAP web service processor

  3. Samples

    Enter You should get this form:

    Cocoon samples packaged in a Web archive hosted in PageBox

    You should be able to call the examples on the list but you cannot view the XSP and stylesheet files.
    The reason is that the component responsible to display files assumes XML and XSL to be stored in files and not in archives as it is the case with PageBox. We could patch the component to support archives but we didn't so far.


  1. We limited the archive size to 192 KB. If your archive is bigger, the upload will fail. It should however be enough to test the functionality.
  2. The response time is bad at the first request, especially for the first SOAP request and when an XSP file must be compiled. Then on this site you can expect a service time around or below 200ms for demo. We get the same performance with a 700Mhz laptop. It is close to Cocoon-alone performance.

Installation Constellations Versions Demo
Publisher Mapper Cocoon/SOAP Security Configurator
J2EE version Embedded version Diskless version
©2001-2004 Alexis Grandemange   Last modified