org.apache.cocoon
Class Cocoon

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

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.19 $ $Date: 1999/10/22 22:12:52 $
Author:
Stefano Mazzocchi
See Also:
Serialized Form

Field Summary
(package private)  Configurations confs
           
(package private)  java.lang.String confsName
           
(package private)  Engine engine
           
(package private)  java.lang.Exception exception
           
(package private)  java.lang.String message
           
(package private)  java.lang.String server
           
(package private)  boolean showStatus
           
(package private)  java.lang.String statusURL
           
 
Fields inherited from class javax.servlet.http.HttpServlet
HEADER_IFMODSINCE, HEADER_LASTMOD, LSTRING_FILE, lStrings, METHOD_DELETE, METHOD_GET, METHOD_HEAD, METHOD_OPTIONS, METHOD_POST, METHOD_PUT, METHOD_TRACE
 
Fields inherited from class javax.servlet.GenericServlet
config
 
Fields inherited from interface org.apache.cocoon.Defaults
BROWSERS_PROP, CACHE_DEFAULT, CACHE_PROP, COCOON_FORMAT_PI, COCOON_PROCESS_PI, DEBUG, DEFAULT_BROWSER, FORMATTER_PROP, INIT_ARG, INTERNAL_PROPERTIES, INTERPRETER_PROP, NAME, PARSER_DEFAULT, PARSER_PROP, PROCESSOR_PROP, PRODUCER_PROP, PROPERTIES, SHOW_STATUS, STATUS_URL, STATUS_URL_DEFAULT, STORE_DEFAULT, STORE_PROP, STYLESHEET_PI, VERBOSE, VERSION
 
Constructor Summary
Cocoon()
           
 
Method Summary
private static java.lang.String getProperties(java.lang.String file)
           
 java.lang.String getServletInfo()
          This method returns the Servlet information string.
private  java.util.Hashtable getStatus()
          Method called to show the servlet status.
 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.
private static void usage()
           
static java.lang.String version()
          Returns the version signature of Cocoon
 
Methods inherited from class javax.servlet.http.HttpServlet
, doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getAllDeclaredMethods, getLastModified, maybeSetLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

engine

Engine engine

message

java.lang.String message

exception

java.lang.Exception exception

confs

Configurations confs

confsName

java.lang.String confsName

server

java.lang.String server

statusURL

java.lang.String statusURL

showStatus

boolean showStatus
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

getStatus

private java.util.Hashtable getStatus()
Method called to show the servlet status.

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.

usage

private static void usage()

getProperties

private static java.lang.String getProperties(java.lang.String file)
                                       throws java.lang.Exception


Copyright 1999 Java Apache Project. All Rights Reserved.