Return-Path: X-Original-To: apmail-cocoon-cvs-archive@www.apache.org Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9223C9D93 for ; Mon, 23 Apr 2012 15:00:15 +0000 (UTC) Received: (qmail 15500 invoked by uid 500); 23 Apr 2012 15:00:15 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 15447 invoked by uid 500); 23 Apr 2012 15:00:15 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 15438 invoked by uid 99); 23 Apr 2012 15:00:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Apr 2012 15:00:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Apr 2012 15:00:03 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2390D23889D5 for ; Mon, 23 Apr 2012 14:59:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1329268 [2/4] - in /cocoon/site/site/2.2: ./ css/ images/ js/ Date: Mon, 23 Apr 2012 14:59:39 -0000 To: cvs@cocoon.apache.org From: ilgrosso@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120423145941.2390D23889D5@eris.apache.org> Modified: cocoon/site/site/2.2/1347_1_1.html URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/1347_1_1.html?rev=1329268&r1=1329267&r2=1329268&view=diff ============================================================================== --- cocoon/site/site/2.2/1347_1_1.html (original) +++ cocoon/site/site/2.2/1347_1_1.html Mon Apr 23 14:59:38 2012 @@ -29,17 +29,13 @@ Cocoon 2.2 Site - All Sitemap Components - + - - - + + + - +

Apache » Cocoon »

@@ -74,7 +70,7 @@
  • Core 2.2
  • Blocks 2.2
  • Maven Plugins 2.2
  • -
  • Cocoon 3.0 [alpha]
  • +
  • Cocoon 3.0
  • Subprojects
  • @@ -89,7 +85,7 @@
  • @@ -150,18 +142,38 @@
  • -

    All Sitemap Components

    A complete list of all available Sitemap components ordered by type:

    Generators

    Component NameName in SitemapBlock
    CalendarGeneratorcalendarcore
    CSVGeneratorcsvcore
    CSVGeneratorBeancore
    DefaultContentAggregatorcore
    DirectoryGeneratordirectorycore
    ExceptionGeneratorcore
    FileGeneratorfilecore
    FileGeneratorBeanfilecore
    FragmentExtractorGeneratorcore
    ImageDirectoryGeneratorimagedirectorycore
    LinkStatusGeneratorlinkstatuscore
    MP3DirectoryGeneratormp3directorycore
    NotifyingGeneratorcor e
    PauseGeneratorcore
    PauseGeneratorBeancore
    RequestGeneratorrequestcore
    ServletServiceGeneratorservletServicecore
    SessionAttributeGeneratorsessionattributecore
    StatusGeneratorstatuscore
    StreamGeneratorstreamcore
    TraversableGeneratorcore
    XPathDirectoryGeneratorxpathdirectorycore
    XPathTraversableGeneratorcore
    FormsGeneratorforms
    SuggestionListGeneratorforms
    HTMLGeneratorhtmlhtml
    NekoHTMLGeneratornekohtmlhtml
    IMAPGeneratormail
    JXTemplateGeneratorjxtemplate

    Transformers

    Component NameName in SitemapBlock
    BrowserUpdateTransformerajax
    AugmentTransformeraugmentcore
    CIncludeTransformercincludecore
    EncodeURLTransformerencodeurlcore
    FilterTransformerfiltercore
    FragmentExtractorTransformerco re
    I18nTransformeri18ncore
    IncludeTransformerincludecore
    JPathTransformerjpathcore
    LinkGatherercore
    LinkTranslatorcore
    LogTransformerlogcore
    Paginatorcore
    ReadDOMSessionTransformerreadDOM sessioncore
    RoleFilterTransformerrole-filtercore
    ServletServiceTransformerservletServicecore
    SimpleFormInstanceExtractionTransformersimple-form-instancecore
    SimpleFormTransformersimple-formcore
    SourceWritingTransformersourcewritingcore
    StripNameSpacesTransformerstripnamespacescore
    TeeTransf ormerteecore
    TraxTransformerxsltcore
    WriteDOMSessionTransformerwriteDOMsessioncore
    XIncludeTransformerxincludecore
    XSLTTransformerxsltcore
    SQLTransformerdatabases
    FormsTemplateTransformerforms
    CleanupTransformerhtml
    HTMLTransformerhtml
    NekoHTMLTransformerhtml
    LinkRewriterTransformerlinkrewriter
    VariableRewriterTransformerlinkrewriter
    SendMailTransformermail
    JXTemplateTransformertemplate
    TransformerAdaptertemplate

    Serializers

    Component NameName in SitemapBlock
    SVGSerializerbatik
    HTMLSerializerhtmlcore
    LinkSerializercore
    ServletServiceSerializerservletServicecore
    TextSerializercore
    XMLSerializercore
    ZipArchiveSerializercore
    FOPNGSerializerfop
    FOPSerializerfop

    Matchers

    Component NameName in SitemapBlock
    AjaxRequestMatcherajax
    CachingRegexpMatchercore
    CachingWildcardMatchercore
    CookieMatchercore
    HeaderMatchercore
    LocaleMatchercore
    MountTableMatchercore
    ParameterMatchercore
    RegexpHeaderMatchercore
    RegexpHostMatchercore
    RegexpParameterMatchercore
    RegexpRequestAttributeMatchercore
    RegexpRequestParameterMatchercore
    RegexpSessionAttributeMatchercore
    RegexpURIMatchercore
    RequestAttributeMatchercore
    RequestParameterMatchercore
    SessionAttributeMatchercore
    WildcardHeaderMatchercore
    WildcardHostMatchercore
    WildcardMatchercore
    WildcardParameter Matchercore
    WildcardRequestAttributeMatchercore
    WildcardRequestParameterMatchercore
    WildcardSessionAttributeMatchercore
    WildcardURIMatchercore

    Selectors

    Component NameName in SitemapBlock
    AjaxRequestSelectorajax
    BrowserSelectorcore
    CookieSelectorcore
    ExceptionSelectorcore
    HeaderSelectorcore
    HostSelectorcore
    ParameterSelectorcore
    RegexpHeaderSelectorcore
    RegexpRequestParameterSelectorcore
    RequestAttributeSelectorcore
    RequestMethodSelectorcore
    RequestParameterSelectorcore
    ResourceExistsSelectorcore
    SessionAttributeSelectorcore
    SimpleSelectorcore
    XPathExceptionSelectorcore

    Actions

    Component NameName in SitemapBlock
    GetContinuationActionajax
    LoggedInActionauth
    LoginActionauth
    LogoutActionauth
    ClearCacheActioncore
    ClearPersistentStoreActioncore
    CopySourceActioncore
    FormValidatorActioncore
    HelloActioncore
    HttpCacheActioncore
    HttpHeaderActioncore
    InputModuleActioncore
    LocaleActioncore
    LogActioncore
    PreemptiveLoaderActioncore
    PropagatorActioncore
    RequestParamActioncore
    RequestParameterExistsActioncore
    ResourceExistsActioncore
    SessionInvalidatorActioncore
    SessionIsValidActioncore
    SessionPropagatorActioncore
    SessionStateActioncore
    SessionValidatorActioncore
    SetCharacterEncodingActioncore
    SetterActioncore
    DatabaseAddActiondatabases
    DatabaseAddActiondatabases
    DatabaseAuthenticatorActiondatabases
    DatabaseCookieAuthenticatorActiondatabases
    DatabaseDeleteActiondatabases
    DatabaseDeleteActiondatabases
    DatabaseQu eryActiondatabases
    DatabaseSelectActiondatabases
    DatabaseSelectActiondatabases
    DatabaseUpdateActiondatabases
    DatabaseUpdateActiondatabases
    OraAddActiondatabases
    OraUpdateActiondatabases
    HandleFormSubmitActionforms
    InitForm1Actionforms
    MakeFormActionforms
    MailActionmail
    Sendmailmail
    SendmailActionmail
    Errors and Improvements? If you see any errors or potential improvements in this document please help - us: View, Edit or comment on the latest development version (registration required). -
    + +

    All Sitemap Components

    A complete list of all available Sitemap components ordered by type:

    Generators

    Component NameName in SitemapBlock
    CalendarGeneratorcalendarcore
    CSVGeneratorcsvcore
    CSVGeneratorBeancore
    DefaultContentAggregatorcore
    DirectoryGeneratordirectorycore
    ExceptionGeneratorcore
    FileGeneratorfilecore
    FileGeneratorBeanfilecore
    FragmentExtractorGeneratorcore
    ImageDirectoryGeneratorimagedirectorycore
    LinkStatusGeneratorlinkstatuscore
    MP3DirectoryGeneratormp3directorycore
    NotifyingGeneratorcore
    PauseGeneratorcore
    PauseGeneratorBeancore
    RequestGeneratorrequestcore
    ServletServiceGeneratorservletServicecore
    SessionAttributeGeneratorsessionattributecore
    StatusGeneratorstatuscore
    StreamGeneratorstreamcore
    TraversableGeneratorcore
    XPathDirectoryGeneratorxpathdirectorycore
    XPathTraversableGeneratorcore
    FormsGeneratorforms
    SuggestionListGeneratorforms
    HTMLGeneratorhtmlhtml
    NekoHTMLGeneratornekohtmlhtml
    IMAPGeneratormail
    JXTemplateGeneratorjxtemplate

    Transformers

    Component NameName in SitemapBlock
    BrowserUpdateTransformerajax
    AugmentTransformeraugmentcore
    CIncludeTransformercincludecore
    EncodeURLTransformerencodeurlcore
    FilterTransformerfiltercore
    Fragment ExtractorTransformercore
    I18nTransformeri18ncore
    IncludeTransformerincludecore
    JPathTransformerjpathcore
    LinkGatherercore
    LinkTranslatorcore
    LogTransformerlogcore
    Paginatorcore
    R eadDOMSessionTransformerreadDOMsessioncore
    RoleFilterTransformerrole-filtercore
    ServletServiceTransformerservletServicecore
    SimpleFormInstanceExtractionTransformersimple-form-instancecore
    SimpleFormTransformersimple-formcore
    SourceWritingTransformersourcewritingcore
    StripNameSpacesTransformerstripnamespacescore
    TeeTransformerteecore
    TraxTransformerxsltcore
    WriteDOMSessionTransformerwriteDOMsessioncore
    XIncludeTransformerxincludecore
    XSLTTransformerxsltcore
    SQLTransformerdatabases
    FormsTemplateTransformerforms
    CleanupTransformerhtml
    HTMLTransformerhtml
    NekoHTMLTransformerhtml
    LinkRewriterTransformerlinkrewriter
    VariableRewriterTransformerlinkrewriter
    SendMailTransformermail
    JXTemplateTransformertemplate
    TransformerAdaptertemplate

    Serializers

    Component NameName in SitemapBlock
    SVGSerializerbatik
    HTMLSerializerhtmlcore
    LinkSerializercore
    ServletServiceSerializerservletServicecore
    TextSerializercore
    XMLSerializercore
    ZipArchiveSerializercore
    FOPNGSerializerfop
    FOPSerializerfop

    Matchers

    Component NameName in SitemapBlock
    AjaxRequestMatcherajax
    CachingRegexpMatchercore
    CachingWildcardMatchercore
    CookieMatchercore
    HeaderMatchercore
    LocaleMatchercore
    MountTableMatchercore
    ParameterMatchercore
    RegexpHeaderMatchercore
    RegexpHostMatchercore
    RegexpParameterMatchercore
    RegexpRequestAttributeMatchercore
    RegexpRequestParameterMatchercore
    RegexpSessionAttributeMatchercore
    RegexpURIMatchercore
    RequestAttributeMatchercore
    RequestParameterMatchercore
    SessionAttributeMatchercore
    WildcardHeaderMatchercore
    WildcardHostMatchercore
    WildcardMatchercore
    WildcardParameterMatchercore
    WildcardRequestAttributeMatchercore
    WildcardRequestParameterMatchercore
    WildcardSessionAttributeMatchercore
    WildcardURIMatchercore

    Selectors

    Component NameName in SitemapBlock
    AjaxRequestSelectorajax
    BrowserSelectorcore
    CookieSelectorcore
    ExceptionSelectorcore
    HeaderSelectorcore
    HostSelectorcore
    ParameterSelectorcore
    RegexpHeaderSelectorcore
    RegexpRequestParameterSelectorcore
    RequestAttributeSelectorcore
    RequestMethodSelectorcore
    RequestParameterSelectorcore
    ResourceExistsSelectorcore
    SessionAttributeSelectorcore
    SimpleSelectorcore
    XPathExceptionSelectorcore

    Actions

    Component NameName in Sitemap< /th>Block
    GetContinuationActionajax
    LoggedInActionauth
    LoginActionauth
    LogoutActionauth
    ClearCacheActioncore
    ClearPersistentStoreActioncore
    CopySourceActioncore
    FormValidatorActioncore
    HelloActioncore
    HttpCacheActioncore
    HttpHeaderActioncore
    InputModuleActioncore
    LocaleActioncore
    LogActioncore
    PreemptiveLoaderActioncore
    PropagatorActioncore
    RequestParamActioncore
    RequestParameterExistsActioncore
    ResourceExistsActioncore
    SessionInvalidatorActioncore
    SessionIsValidActioncore
    SessionPropagatorActioncore
    SessionStateActioncore
    SessionValidatorActionc ore
    SetCharacterEncodingActioncore
    SetterActioncore
    DatabaseAddActiondatabases
    DatabaseAddActiondatabases
    DatabaseAuthenticatorActiondatabases
    DatabaseCookieAuthenticatorActiondatabases
    DatabaseDeleteActiondatabases
    DatabaseDeleteActiondatabases
    DatabaseQueryActiondatabases
    DatabaseSelectActiondatabases
    DatabaseSelectActiondatabases
    DatabaseUpdateActiondatabases
    DatabaseUpdateActiondatabases
    OraAddActiondatabases
    OraUpdateActiondatabases
    HandleFormSubmitActionforms
    InitForm1Actionforms
    MakeFormActionforms
    MailActionmail
    Sendmailmail
    SendmailActionmail
    +
    - - + + + - +

    Apache » Cocoon »

    @@ -74,7 +70,7 @@
  • Core 2.2
  • Blocks 2.2
  • Maven Plugins 2.2
  • -
  • Cocoon 3.0 [alpha]
  • +
  • Cocoon 3.0
  • Subprojects
  • @@ -89,7 +85,7 @@
  • @@ -150,76 +142,92 @@
  • +

    Deploying a Cocoon application

    This tutorial is based on the -Your +Your first Cocoon application using Maven 2 which shows how to bootstrap a Cocoon project and Modularize Cocoon apps which shows how inter-block communication works. If you haven't followed the latter tutorial, you can go through this tutorial nonetheless but you have to skip everything -that refers to myBlock2.

    In this tutorial, you will:

      +that refers to myBlock2.

      In this tutorial, you will:

      1. Connect blocks to the webapp and run it
      2. -
      3. Create a parent Maven POM for the webapp and block

        +
      4. Create a parent Maven POM for the webapp and block
        (a convenience which allows you to trigger cascading builds of both maven modules from a single command)
      5. Change the block mount point so that it is mounted at the root level context (typical for a web application's "main block")
      6. -

      Creating a Cocoon web application

      For this tutorial you will use the Cocoon web application archetype to create +

    Creating a Cocoon web application

    For this tutorial you will use the Cocoon web application archetype to create a Cocoon block suitable for generating a war file which can be deployed on a -servlet container such as Tomcat or Websphere etc.  Change into the -getting-started-app folder and type the following command: -
    mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org
    -
    Choose the web application archetype:
    Choose archetype:
    +servlet container such as Tomcat or Websphere etc.  Change into the
    +getting-started-app folder and type the following command: -
    mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org
    +
    Choose the web application archetype:
    Choose archetype:
     1: remote -> cocoon-22-archetype-block-plain (Creates an empty Cocoon block; useful
    - if you want to add another block to a Cocoon application)
    + if you want to add another block to a Cocoon application)
     2: remote -> cocoon-22-archetype-block (Creates a Cocoon block containing some small
    - samples)
    + samples)
     3: remote -> cocoon-22-archetype-webapp (Creates a web application configured to
      host Cocoon blocks. Just add the block dependencies)
    -Choose a number:  (1/2/3): 3
    -
    Then respond to the other questions as follows:
    Define value for groupId: : com.mycompany
    -Define value for artifactId: : myCocoonWebApp
    -Define value for version:  1.0-SNAPSHOT: : 1.0.0
    -Define value for package: : com.mycompany.myCocoonWebApp 
    -

    Looking at the filesystem, you should find following directory structure:

    getting-started-app
    - +-myBlock1
    +Choose a number:  (1/2/3): 3
    +
    Then respond to the other questions as follows:
    Define value for groupId: : com.mycompany
    +Define value for artifactId: : myCocoonWebApp
    +Define value for version:  1.0-SNAPSHOT: : 1.0.0
    +Define value for package: : com.mycompany.myCocoonWebApp 
    +

    Looking at the filesystem, you should find following directory structure:

    getting-started-app
    + +-myBlock1
      |  +-pom.xml
      |  +-src
      |     +-[...]
    - +-myBlock2
    + +-myBlock2
      |  +-pom.xml
      |  +-src
      |     +-[...]
    - +-myCocoonWebapp    
    + +-myCocoonWebapp    
         +-pom.xml
         +-src
            +-[...]
    -

    Using a block within the web application

    In order to use blocks as dependencies you need to install them into +

    Using a block within the web application

    In order to use blocks as dependencies you need to install them into Maven's local repository. First go to myBlock1/ directory and execute -following command:

    mvn install
    -

    Then go to myBlock2/ and execute the same command. This way both +following command:

    mvn install
    +

    Then go to myBlock2/ and execute the same command. This way both blocks will get installed into local repository where Maven stores all artifacts that can be used as dependencies.

    So far the web application myCocoonWebapp doesn't have any information about the existense of the block myBlock1 and myBlock2. Change this by opening getting-started-app/myCocoonWebapp/pom.xml and add the block as -dependency:

    <project>
    -  [...]
    -    <dependencies>
    -      <dependency>
    -        <groupId>com.mycompany</groupId>
    -        <artifactId>myBlock1</artifactId>
    -        <version>1.0-SNAPSHOT</version>
    -      </dependency>
    -      <dependency>
    -        <groupId>com.mycompany</groupId>
    -        <artifactId>myBlock2</artifactId>
    -        <version>1.0-SNAPSHOT</version>
    -      </dependency>
    -    </dependencies>
    -  [...]
    -</project>

    That's it. Now it's time to run the web application. Move into -getting-started-app/myCocoonWebapp and call

    mvn package jetty:run

    from there.

    -Open your favorite web browser and call

    http://localhost:8888/myBlock1/

    That's it!

    Creating a parent pom

    For your convenience you can create a parent pom for the three Maven modules. -Create a file getting-started-app/pom.xml with following content:

    <project xmlns="http://maven.apache.org/POM/4.0.0" 
    +dependency:

    <project>
    +  [...]
    +    <dependencies>
    +      <dependency>
    +        <groupId>com.mycompany</groupId>
    +        <artifactId>myBlock1</artifactId>
    +        <version>1.0-SNAPSHOT</version>
    +      </dependency>
    +      <dependency>
    +        <groupId>com.mycompany</groupId>
    +        <artifactId>myBlock2</artifactId>
    +        <version>1.0-SNAPSHOT</version>
    +      </dependency>
    +    </dependencies>
    +  [...]
    +</project>

    That's it. Now it's time to run the web application. Move into +getting-started-app/myCocoonWebapp and call

    mvn package jetty:run

    from there.
    +Open your favorite web browser and call

    http://localhost:8888/myBlock1/

    That's it!

    Creating a parent pom

    For your convenience you can create a parent pom for the three Maven modules. +Create a file getting-started-app/pom.xml with following content:

    <project xmlns="http://maven.apache.org/POM/4.0.0" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     
    @@ -233,49 +241,53 @@ Create a file getting-started-app/po
       <name>Cocoon Getting Stared application [parent]</name>
       
       <modules>
    -    <module>myCocoonWebapp</module>
    -    <module>myBlock1</module>
    -    <module>myBlock2</module>
    -  </modules>
    +    <module>myCocoonWebapp</module>
    +    <module>myBlock1</module>
    +    <module>myBlock2</module>
    +  </modules>
     </project>
    -

    Having a parent pom file, you can trigger a reactor build from root, e.g. you +

    Having a parent pom file, you can trigger a reactor build from root, e.g. you can call mvn install from root which will compile, package and install the webapp and the block. Maven also takes care that the modules are build, according to the dependency graph, in the correct order.

    If you want to inherit information (e.g. plugin configurations, properties, etc.) from the new parent pom to its child modules, you have to add the parent element to getting-started-app/myCocoonWebapp/pom.xml , getting-started-app/myBlock1/pom.xml and -getting-started-app/myBlock2/pom.xml:

    <project xmlns="http://maven.apache.org/POM/4.0.0" 
    +getting-started-app/myBlock2/pom.xml:

    <project xmlns="http://maven.apache.org/POM/4.0.0" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     
       [...]
    -  <parent>
    +  <parent>
         <groupId>com.mycompany</groupId>
         <artifactId>getting-started-app</artifactId>
         <version>1-SNAPSHOT</version>
    -  </parent>
    +  </parent>
       [...]
     
    -</project>

    Mounting your block at the root level

    You can mount your block at the root level in the application URI space, so +</project>

    Mounting your block at the root level

    You can mount your block at the root level in the application URI space, so that instead of using (for example) the URI http://localhost:8888/myBlock1/foo/bar to request a page, you would request it at http://localhost:8888/foo/bar.

    To do this, edit myBlock1/src/main/resources/META-INF/cocoon/spring/blockServlet.xml , -and change the element

        <property name="mountPath" value="/myBlock1"/>
    -

    to

        <property name="mountPath" value=""/>
    -

    and then run:

     mvn install
    Errors and Improvements? If you see any errors or potential improvements in this document please help - us: View, Edit or comment on the latest development version (registration required). -
    +and change the element

        <property name="mountPath" value="/myBlock1"/>
    +

    to

        <property name="mountPath" value=""/>
    +

    and then run:

     mvn install
    +