## org.apache.cocoon
Class Cocoon

    java.lang.Object
      |
      +--javax.servlet.GenericServlet
            |
            +--javax.servlet.http.HttpServlet
                  |
                  +--org.apache.cocoon.Cocoon

All Implemented Interfaces:
  Defaults, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Cocoon
extends javax.servlet.http.HttpServlet
implements Defaults

The Cocoon Publishing Framework. This servlet implements an XML/XSL server side publishing framework to separate different knowledge contexts in different processing layers.

Version:
  $Revision: 1.21 $ $Date: 2001/01/18 22:43:45 $
Author:
  Stefano Mazzocchi
See Also:
  Serialized Form

Fields inherited from interface org.apache.cocoon.Defaults

`BROWSERS_PROP, CACHE_DEFAULT, CACHE_PROP, COCOON_FORMAT_PI, COCOON_PROCESS_PI, DEFAULT_BROWSER, DISABLE_CACHING_PI, ERROR_INTERNALLY, FORMATTER_PROP, HOME, INIT_ARG, INTERPRETER_PROP, LOG, LOG_LEVEL, LOOPS, NAME, OUTPUTTING, PARSER_DEFAULT, PARSER_PROP, PROCESSOR_PROP, PRODUCER_PROP, PROFILER_DEFAULT, PROFILER_PROP, PROPERTIES, SHOW_STATUS, STATUS_URL, STATUS_URL_DEFAULT, STORE_DEFAULT, STORE_PROP, STYLESHEET_PI, TRANSFORMER_DEFAULT, TRANSFORMER_PROP, VERSION, WHOLE_REQUEST, YEAR`

Constructor Summary
`Cocoon()`

Method Summary
`void` `destroy()`
`java.lang.String` `getServletInfo()` This method returns the Servlet information string.
`void` `init(javax.servlet.ServletConfig config)` This method initializes the servlet.
`static void` `main(java.lang.String[] argument)` The entry point for standalone usage of Cocoon.
`void` `service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` This method is called by the servlet engine to handle the request.
`static java.lang.String` `version()` Returns the version signature of Cocoon

Methods inherited from class javax.servlet.http.HttpServlet
`doDelete, doGet, doOptions, doPost, doPut, doTrace, getLastModified, service`

Methods inherited from class javax.servlet.GenericServlet
`getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Cocoon

    public Cocoon()

Method Detail

### version

    public static java.lang.String version()

  Returns the version signature of Cocoon

### init

    public void init(javax.servlet.ServletConfig config)
              throws javax.servlet.ServletException

  This method initializes the servlet.
  Overrides:
    `init` in class `javax.servlet.GenericServlet`

### service

    public void service(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws javax.servlet.ServletException,
                        java.io.IOException

  This method is called by the servlet engine to handle the request.
  Overrides:
    `service` in class `javax.servlet.http.HttpServlet`

### destroy

    public void destroy()

  Overrides:
    `destroy` in class `javax.servlet.GenericServlet`

### getServletInfo

    public java.lang.String getServletInfo()

  This method returns the Servlet information string.
  Overrides:
    `getServletInfo` in class `javax.servlet.GenericServlet`

### main

    public static void main(java.lang.String[] argument)
                     throws java.lang.Exception

  The entry point for standalone usage of Cocoon. This part is a little hack to be able to process XML files from the command line. It's not, by no means, a complete application and it's a dirty patch. If would be nice to have things like wildcards processing to be able to generate static sites from XML+XSL using cron processes and such. Plus the ability to look for XSL PI to get the stylesheets from inside, plus the ability to print on file, to get URLS instead of files, etc, etc... As you see, there's room for tons on work on this section.

Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.