Cocoon 2 Und Tomcat

Total Page:16

File Type:pdf, Size:1020Kb

Cocoon 2 Und Tomcat Liebe Leserin, lieber Leser, ich freue mich, dass Sie sich für ein Buch von Galileo Computing entschieden haben. Das Open Source-Projekt Apache-Cocoon braucht in seiner jetzigen Version den Vergleich mit kommerziellen Tools nicht mehr zu scheuen. Innerhalb kurzer Zeit hat es sich zu einem der mächtigsten Frameworks zur Entwicklung von Web- anwendungen entwickelt. Unternehmen wie die Commerzbank oder Hewlett- Packard sowie weitere Institutionen und Firmen haben die Leistungsfähigkeit für sich entdeckt und verwenden Cocoon als XML-Publishing-Framework oder haben Teile davon in Ihre Web-Anwendungen integriert. Ich bin froh, mit Stephan Niedermeier einen Autor gefunden zu haben, der in der Lage ist, Ihnen eine umfassende Einführung in das komplexe Zusammenspiel der Komponenten zu bieten. Mit seiner Hilfe werden Sie Ihre Lernkurve beim Einstieg in Cocoon deutlich senken. Entwicklern und Anwendern eröffnet es den Weg zum produktiven Einsatz von Cocoon. Seit längerer Zeit bietet der Autor eines der meistgelesenen deutschsprachigen Online-Tutorials zur Cocoon-Thematik auf sei- ner Webseite www.logabit.com/cocoontutorial/. Viele Erfahrungen mit eigenen Projekten sind zudem in dieses Buch eingeflossen. Mit viel Sorgfalt haben Autor und Verlag dieses Buch produziert. Ein perfektes Buch kann es leider dennoch nicht geben. Ich freue mich daher, wenn Sie sich mit Ihren kritischen Anmerkungen an mich wenden oder den Kontakt zum Autor in seinem Forum unter www.cocoonforum.de suchen. Und nun viel Freude bei der Lektüre Stephan Mattescheck Lektorat Galileo Computing [email protected] www.galileocomputing.de Galileo Press • Gartenstraße 24 • 53229 Bonn Auf einen Blick Vorwort ........................................................................... 21 1 Einführung in Cocoon...................................................... 25 2 XML – Eine Einführung.................................................... 45 3 XML beschränken............................................................ 69 4 Das Layout – XSL ............................................................. 101 5 Programmieren mit XML ................................................. 133 6 Tomcat............................................................................. 157 7 Cocoon installieren.......................................................... 251 8 Die Sitemap..................................................................... 261 9 Module............................................................................ 347 10 Cocoon erweitern ............................................................ 355 11 Control Flow.................................................................... 441 12 Formularbearbeitung....................................................... 479 13 XSP .................................................................................. 569 14 Datei-Upload................................................................... 585 15 Datenbankzugriffe mit Cocoon........................................ 597 16 Internationalisierung ....................................................... 623 17 Cocoon im Einsatz: Das Portal......................................... 647 A Tomcat............................................................................. 687 B Actions ............................................................................ 708 C Generatoren .................................................................... 713 D Matcher........................................................................... 743 E Reader ............................................................................. 746 F Selectoren........................................................................ 749 G Serializer.......................................................................... 753 H Transformer ..................................................................... 770 I FOM ................................................................................ 798 J XSP .................................................................................. 818 K Input-Module.................................................................. 829 L Glossar ............................................................................ 846 M Anhang: Wichtige Quellen .............................................. 849 N Inhalt der CD-ROM......................................................... 854 Index ............................................................................... 857 Inhalt Vorwort 21 1 Einführung in Cocoon 25 1.1 Geschichte von Cocoon ......................................................................... 27 1.2 Anforderungen an Web-Applikationen ................................................. 28 1.2.1 Trennung von Layout, Inhalt und Logik .................................... 29 1.2.2 Plattformunabhängigkeit .......................................................... 31 1.2.3 Personalisierung ....................................................................... 31 1.2.4 Modularität und einfache Erweiterbarkeit ................................. 31 1.2.5 Internationalisierung ................................................................ 32 1.2.6 Skalierbarkeit ........................................................................... 32 1.2.7 Cross-Media-Publishing ........................................................... 32 1.2.8 Verschiedene Datenquellen ...................................................... 34 1.3 Ein kleiner Einblick in Cocoon ............................................................... 35 1.3.1 Cocoon ist Middleware ............................................................ 36 1.3.2 Cocoon basiert auf Avalon ....................................................... 36 1.3.3 Umgebungen ........................................................................... 37 1.3.4 Request-Response-Zyklus ......................................................... 40 1.4 Die Rolle von XML in Cocoon ............................................................... 41 1.5 Zusammenfassung ................................................................................. 43 2 XML – Eine Einführung 45 2.1 Am Anfang stand SGML ........................................................................ 47 2.2 XML wird beschlossen .......................................................................... 48 2.3 Das XML-Dokument ............................................................................. 48 2.3.1 XML-Deklaration ...................................................................... 49 2.3.2 Tags und Elemente ................................................................... 51 2.3.3 Attribute .................................................................................. 52 2.3.4 Wohlgeformtheit und Gültigkeit ............................................... 53 2.3.5 Eltern- und Kindelemente ........................................................ 57 2.3.6 Entity-Referenzen .................................................................... 58 2.3.7 CDATA ..................................................................................... 59 2.3.8 Kommentare ............................................................................ 60 Inhalt 5 2.4 Namensräume ....................................................................................... 61 2.4.1 Default-Namensräume ............................................................. 63 2.4.2 Mehrere Namensräume ........................................................... 63 2.4.3 Beispiel .................................................................................... 64 2.5 Von HTML zu XHTML ........................................................................... 66 3 XML beschränken 69 3.0.1 Das Beispiel-XML-Dokument ................................................... 72 3.1 DTD ...................................................................................................... 74 3.1.1 DTD referenzieren ................................................................... 74 3.1.2 Elemente ................................................................................. 76 3.1.3 Attribute .................................................................................. 79 3.1.4 Entities .................................................................................... 82 3.2 XML Schema ......................................................................................... 82 3.2.1 Ein XML Schema referenzieren ................................................ 84 3.2.2 XML-Schema-Datei .................................................................. 85 3.2.3 Typen ...................................................................................... 86 3.2.4 Einfache Elemente und Attribute ............................................. 88 3.2.5 Komplexe Elemente ................................................................. 92 3.2.6 Typen referenzieren ................................................................. 96 3.2.7 Das Beispiel in XML Schema .................................................... 98 4 Das Layout – XSL 101 4.1 XSLT ...................................................................................................... 103 4.1.1 XPath ....................................................................................... 103 4.1.2 Der Aufbau eines XSLT-Stylesheets .......................................... 104 4.1.3 Der XSLT-Prozessor ................................................................. 105 4.1.4 XSLT-Templates
Recommended publications
  • SDL Livecontent S1000D Delivery Server Installation and Upgrade Manual
    SDL LiveContent S1000D Delivery Server Installation and Upgrade Manual SDL LiveContent S1000D 5.6 January 2018 Legal notice Copyright and trademark information relating to this product release. Copyright © 2009–2018 SDL Group. SDL Group means SDL PLC. and its subsidiaries and affiliates. All intellectual property rights contained herein are the sole and exclusive rights of SDL Group. All references to SDL or SDL Group shall mean SDL PLC. and its subsidiaries and affiliates details of which can be obtained upon written request. All rights reserved. Unless explicitly stated otherwise, all intellectual property rights including those in copyright in the content of this website and documentation are owned by or controlled for these purposes by SDL Group. Except as otherwise expressly permitted hereunder or in accordance with copyright legislation, the content of this site, and/or the documentation may not be copied, reproduced, republished, downloaded, posted, broadcast or transmitted in any way without the express written permission of SDL. LiveContent S1000D is a registered trademark of SDL Group. All other trademarks are the property of their respective owners. The names of other companies and products mentioned herein may be the trademarks of their respective owners. Unless stated to the contrary, no association with any other company or product is intended or should be inferred. This product may include open source or similar third-party software, details of which can be found by clicking the following link: “Acknowledgments ” on page 15. Although SDL Group takes all reasonable measures to provide accurate and comprehensive information about the product, this information is provided as-is and all warranties, conditions or other terms concerning the documentation whether express or implied by statute, common law or otherwise (including those relating to satisfactory quality and fitness for purposes) are excluded to the extent permitted by law.
    [Show full text]
  • Return of Organization Exempt from Income
    OMB No. 1545-0047 Return of Organization Exempt From Income Tax Form 990 Under section 501(c), 527, or 4947(a)(1) of the Internal Revenue Code (except black lung benefit trust or private foundation) Open to Public Department of the Treasury Internal Revenue Service The organization may have to use a copy of this return to satisfy state reporting requirements. Inspection A For the 2011 calendar year, or tax year beginning 5/1/2011 , and ending 4/30/2012 B Check if applicable: C Name of organization The Apache Software Foundation D Employer identification number Address change Doing Business As 47-0825376 Name change Number and street (or P.O. box if mail is not delivered to street address) Room/suite E Telephone number Initial return 1901 Munsey Drive (909) 374-9776 Terminated City or town, state or country, and ZIP + 4 Amended return Forest Hill MD 21050-2747 G Gross receipts $ 554,439 Application pending F Name and address of principal officer: H(a) Is this a group return for affiliates? Yes X No Jim Jagielski 1901 Munsey Drive, Forest Hill, MD 21050-2747 H(b) Are all affiliates included? Yes No I Tax-exempt status: X 501(c)(3) 501(c) ( ) (insert no.) 4947(a)(1) or 527 If "No," attach a list. (see instructions) J Website: http://www.apache.org/ H(c) Group exemption number K Form of organization: X Corporation Trust Association Other L Year of formation: 1999 M State of legal domicile: MD Part I Summary 1 Briefly describe the organization's mission or most significant activities: to provide open source software to the public that we sponsor free of charge 2 Check this box if the organization discontinued its operations or disposed of more than 25% of its net assets.
    [Show full text]
  • Full-Graph-Limited-Mvn-Deps.Pdf
    org.jboss.cl.jboss-cl-2.0.9.GA org.jboss.cl.jboss-cl-parent-2.2.1.GA org.jboss.cl.jboss-classloader-N/A org.jboss.cl.jboss-classloading-vfs-N/A org.jboss.cl.jboss-classloading-N/A org.primefaces.extensions.master-pom-1.0.0 org.sonatype.mercury.mercury-mp3-1.0-alpha-1 org.primefaces.themes.overcast-${primefaces.theme.version} org.primefaces.themes.dark-hive-${primefaces.theme.version}org.primefaces.themes.humanity-${primefaces.theme.version}org.primefaces.themes.le-frog-${primefaces.theme.version} org.primefaces.themes.south-street-${primefaces.theme.version}org.primefaces.themes.sunny-${primefaces.theme.version}org.primefaces.themes.hot-sneaks-${primefaces.theme.version}org.primefaces.themes.cupertino-${primefaces.theme.version} org.primefaces.themes.trontastic-${primefaces.theme.version}org.primefaces.themes.excite-bike-${primefaces.theme.version} org.apache.maven.mercury.mercury-external-N/A org.primefaces.themes.redmond-${primefaces.theme.version}org.primefaces.themes.afterwork-${primefaces.theme.version}org.primefaces.themes.glass-x-${primefaces.theme.version}org.primefaces.themes.home-${primefaces.theme.version} org.primefaces.themes.black-tie-${primefaces.theme.version}org.primefaces.themes.eggplant-${primefaces.theme.version} org.apache.maven.mercury.mercury-repo-remote-m2-N/Aorg.apache.maven.mercury.mercury-md-sat-N/A org.primefaces.themes.ui-lightness-${primefaces.theme.version}org.primefaces.themes.midnight-${primefaces.theme.version}org.primefaces.themes.mint-choc-${primefaces.theme.version}org.primefaces.themes.afternoon-${primefaces.theme.version}org.primefaces.themes.dot-luv-${primefaces.theme.version}org.primefaces.themes.smoothness-${primefaces.theme.version}org.primefaces.themes.swanky-purse-${primefaces.theme.version}
    [Show full text]
  • Running Apache FOP
    Running Apache FOP $Revision: 533992 $ Table of contents 1 System Requirements...............................................................................................................2 2 Installation................................................................................................................................2 2.1 Instructions.......................................................................................................................... 2 2.2 Problems..............................................................................................................................2 3 Starting FOP as a Standalone Application...............................................................................3 3.1 Using the fop script or batch file......................................................................................... 3 3.2 Writing your own script.......................................................................................................5 3.3 Running with java's -jar option............................................................................................5 3.4 FOP's dynamical classpath construction............................................................................. 5 4 Using Xalan to Check XSL-FO Input......................................................................................5 5 Memory Usage.........................................................................................................................6 6 Problems.................................................................................................................................
    [Show full text]
  • Mastering Spam a Multifaceted Approach with the Spamato Spam Filter System
    DISS. ETH NO. 16839 Mastering Spam A Multifaceted Approach with the Spamato Spam Filter System A dissertation submitted to the SWISS FEDERAL INSTITUTE OF TECHNOLOGY ZURICH for the degree of Doctor of Sciences presented by KENO ALBRECHT Dipl. Inf. born June 4, 1977 citizen of Germany accepted on the recommendation of Prof. Dr. Roger Wattenhofer, examiner Prof. Dr. Gordon V. Cormack, co-examiner Prof. Dr. Christof Fetzer, co-examiner 2006 Abstract Email is undoubtedly one of the most important applications used to com- municate over the Internet. Unfortunately, the email service lacks a crucial security mechanism: It is possible to send emails to arbitrary people with- out revealing one’s own identity. Additionally, sending millions of emails costs virtually nothing. Hence over the past years, these characteristics have facilitated and even boosted the formation of a new business branch that advertises products and services via unsolicited bulk emails, better known as spam. Nowadays, spam makes up more than 50% of all emails and thus has become a major vexation of the Internet experience. Although this problem has been dealt with for a long time, only little success (measured on a global scale) has been achieved so far. Fighting spam is a cat and mouse game where spammers and anti-spammers regularly beat each other with sophisticated techniques of increasing complexity. While spammers try to bypass existing spam filters, anti-spammers seek to detect and block new spamming tricks as soon as they emerge. In this dissertation, we describe the Spamato spam filter system as a mul- tifaceted approach to help regain a spam-free inbox.
    [Show full text]
  • Third-Party Software Usage and Licenses
    Oracle® Endeca Information Discovery Studio Third-Party Software Usage and Licenses Version 3.1.0 • October 2013 Copyright and disclaimer Copyright © 2003, 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. UNIX is a registered trademark of The Open Group. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency- specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
    [Show full text]
  • Third Party Notices Tibco Jaspersoft: Jasperreports Server, Jasperreports, Jaspersoft Studio Updated: 2014‐05‐27 Product Version: 5.6.0
    Third Party Notices Tibco Jaspersoft: JasperReports Server, JasperReports, Jaspersoft Studio Updated: 2014‐05‐27 Product Version: 5.6.0 Component Version Home Page License A Java library for reading/writing Excel 2.6.10 http://sourceforge.net/projects/jexcelapi/ LGPL 2.1 ANT Contrib 1.0b3 http://ant-contrib.sourceforge.net/ Apache License Version 2.0 ant‐deb‐task Unspecified http://github.com/travis/ant-deb-task/ Apache License Version 2.0 ANTLR, ANother Tool for Language Recognition 3.0 http://www.antlr.org/ BSD 2.0 ANTLR, ANother Tool for Language Recognition 2.7.5 http://www.antlr.org/ ANTLR License ANTLR, ANother Tool for Language Recognition Unspecified http://www.antlr.org/ BSD 2.0 ANTLR, ANother Tool for Language Recognition 2.7.6 http://www.antlr.org/ ANTLR License AOP Alliance (Java/J2EE AOP standard) 1.0 http://sourceforge.net/projects/aopalliance/ Public Domain Apache Batik Unspecified http://xml.apache.org/batik/index.html Apache License Version 2.0 avro‐1.4.0‐cassandra‐1.jar http://avro.apache.org/ Apache License Version 2.0 cassandra‐all‐1.2.9.jar 1.2.9 http://cassandra.apache.org/ Apache License Version 2.0 cassandra‐driver‐core‐1.0.4‐dse.jar 1.0.4 http://cassandra.apache.org/ Apache License Version 2.0 cassandra‐thirft‐1.2.9 1.2.9 http://cassandra.apache.org/ Apache License Version 2.0 Apache Cassandra 1.0.6 http://cassandra.apache.org/ Apache License Version 2.0 https://repository.apache.org/content/repositories/releases/org/apa Apache Cassandra 1.0.5 che/cassandra/cassandra-thrift/ Apache License Version 2.0 Apache Commons
    [Show full text]
  • Integrator Third-Party Software Usage and Licenses
    Oracle® Endeca Information Discovery Integrator Integrator Third-Party Software Usage and Licenses Version 3.0.0.2 • July 2013 Copyright and disclaimer Copyright © 2003, 2013, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. UNIX is a registered trademark of The Open Group. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency- specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
    [Show full text]
  • Middleware Architecture with Patterns and Frameworks
    Middleware Architecture with Patterns and Frameworks Sacha Krakowiak Distributed under a Creative Commons license http://creativecommons.org/licenses/by-nc-nd/3.0/ February 27, 2009 Contents Preface ix References........................................ x 1 An Introduction to Middleware 1-1 1.1 Motivation for Middleware . 1-1 1.2 CategoriesofMiddleware . 1-6 1.3 A Simple Instance of Middleware: Remote Procedure Call . ......... 1-7 1.3.1 Motivations and Requirements . 1-8 1.3.2 Implementation Principles . 1-9 1.3.3 Developing Applications with RPC . 1-11 1.3.4 SummaryandConclusions. .1-13 1.4 Issues and Challenges in Middleware Design . 1-14 1.4.1 DesignIssues ...............................1-14 1.4.2 Architectural Guidelines . 1-15 1.4.3 Challenges ................................1-17 1.5 HistoricalNote .................................. 1-18 References........................................1-19 2 Middleware Principles and Basic Patterns 2-1 2.1 ServicesandInterfaces . 2-1 2.1.1 Basic Interaction Mechanisms . 2-2 2.1.2 Interfaces ................................. 2-3 2.1.3 Contracts and Interface Conformance . 2-5 2.2 ArchitecturalPatterns . 2-9 2.2.1 Multilevel Architectures . 2-9 2.2.2 DistributedObjects . .. .. .. .. .. .. .. .2-12 2.3 Patterns for Distributed Object Middleware . 2-15 2.3.1 Proxy ...................................2-15 2.3.2 Factory ..................................2-16 2.3.3 Adapter..................................2-18 2.3.4 Interceptor ................................2-19 2.3.5 Comparing and Combining Patterns . 2-20 2.4 Achieving Adaptability and Separation of Concerns . ..........2-21 2.4.1 Meta-ObjectProtocols. 2-21 2.4.2 Aspect-Oriented Programming . 2-23 ii CONTENTS 2.4.3 PragmaticApproaches. .2-25 2.4.4 ComparingApproaches .
    [Show full text]
  • Third-Party Software Usage and Licenses September 2013
    Oracle Endeca Commerce Third-Party Software Usage and Licenses September 2013 Contents Copyright and disclaimer...............................................................................................5 About this guide.............................................................................................................7 Who should use this guide............................................................................................................................7 Chapter 1: Third-Party Software Usage and Licenses............................9 Commercial Packages and Terms................................................................................................................9 Open Source Packages and Terms............................................................................................................10 Libraries......................................................................................................................................................26 Other Third-party Dependencies.................................................................................................................29 Public domain works ..................................................................................................................................29 Chapter 2: Other Third-Party Licenses...................................................31 Microsoft Public License (Ms-PL)...............................................................................................................31 Tanuki Software,
    [Show full text]
  • Third-Party Software Usage and Licenses Version 11.1 • July 2014
    Oracle Commerce Guided Search Third-Party Software Usage and Licenses Version 11.1 • July 2014 Contents Copyright and disclaimer..........................................................................................................5 About this guide.........................................................................................................................7 Who should use this guide.........................................................................................................................................7 Conventions used in this guide..................................................................................................................................7 Contacting Oracle Support.........................................................................................................................................7 Chapter 1: Third-Party Software Usage and Licenses.....................................9 Commercial Packages and Terms.............................................................................................................................9 Open Source Packages and Terms.........................................................................................................................10 Libraries....................................................................................................................................................................25 Other Third-party Dependencies..............................................................................................................................28
    [Show full text]
  • T 1 JUN. 2009
    on Tito/: pependenc)' lnjecti con Guice VoIU"';A./umn : J1/\ ordi Gerona castel\ó e Ditectot!ponent: carIes Farré Tost Departament: LSl 09 Data: 18/06/20 t 1 JUN. 2009 índice general 1- Introducción 5 1.1. Origen del proyecto . 5 1.2. Motivación 6 1.3. Objetivos 6 1.4. Planificación 6 1.5. Convenciones 8 1.5.1. Código. 8 1.5.2. Traducción 8 1.5.3. UML .... 8 2. Dependency Injection 11 2.1. Qué problema soluciona 11 2.1.1. Antecedentes .. 11 2.1.2. Viendo los Objetos como Servicios 12 2.1.3. Algunas definiciones 14 2.2. Soluciones pre-DI ...... 14 2.2.1. Construcción a mano . 15 2.2.2. El patrón Fábrica .. 17 2.2.3. Service Locator Pattern 19 2.3. Aplicando Dependency Injection 20 1 2.3.1. El principio de Hollywood . 20 2.3.2. Algunas ventajas más de DI . 22 2.4. Frameworks . 22 2.4.1. Apache Avalon 22 2.4.2. PicoContainer . 23 2.4.3. Spring Framework 23 2.4.4. Google Guice . 23 2.4.5. Otros frameworks Java . 24 2.4.6. DI en el mundo no-Java 24 2.4.7. Escogiendo un framework 25 3. Guice 27 3.1. Arquitectura 27 3.1.1. Inicialización 27 3.1.2. Ejecución . 31 3.2. Inicializando una aplicación 33 3.2.1. Punto de entrada . 34 3.2.2. Contexto de ejecución 34 3.3. Más configuración . .... 35 3.3.1. Binding annotations 35 3.3.2. Creando binding annotations 36 3.3.3.
    [Show full text]