taylor 2004/04/19 15:16:12 Added: struts-portlet project.properties maven.xml checkstyle.license .project .encoding .classpath project.xml checkstyle.xml README.txt LICENSE.TXT Log: adding base struts-portlet project
PR: Obtained from: Submitted by: Reviewed by: CVS: ---------------------------------------------------------------------- CVS: PR: CVS: If this change addresses a PR in the problem report tracking CVS: database, then enter the PR number(s) here. CVS: Obtained from: CVS: If this change has been taken from another system, such as NCSA, CVS: then name the system in this line, otherwise delete it. CVS: Submitted by: CVS: If this code has been contributed to Apache by someone else; i.e., CVS: they sent us a patch or a new module, then include their name/email CVS: address here. If this is your work then delete this line. CVS: Reviewed by: CVS: If we are doing pre-commit code reviews and someone else has CVS: reviewed your changes, include their name(s) here. CVS: If you have not had it reviewed then delete this line. Revision Changes Path 1.1 jakarta-jetspeed-2/struts-portlet/project.properties Index: project.properties =================================================================== # Copyright 2004 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Display the date on the Maven web site maven.xdoc.date = left # Display the maven version the web site is documenting maven.xdoc.version = ${pom.currentVersion} maven.checkstyle.header.file=${basedir}/checkstyle.license maven.checkstyle.properties=${basedir}/checkstyle.xml maven.license.licenseFile=${basedir}/LICENSE.TXT maven.compile.deprecation=on # Multiproject settings maven.multiproject.includes=spi/project.xml,framework/project.xml,demo/project.xml maven.repo.remote = http://www.bluesunrise.com/maven/, http://www.ibiblio.org/maven/ 1.1 jakarta-jetspeed-2/struts-portlet/maven.xml Index: maven.xml =================================================================== <!-- Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <project default="install" xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns:reactor="reactor"> <goal name="allClean" description="Clean the master project and all subprojects"> <attainGoal name="subClean"/> </goal> <goal name="subClean" description="Clean all subprojects" > <maven:reactor basedir="${basedir}" includes="spi/project.xml,framework/project.xml,demo/project.xml" goals="clean" banner="Cleaning" ignoreFailures="true"/> </goal> <goal name="install" description="Build framework jars"> <!-- Build jars --> <maven:reactor basedir="${basedir}/spi" includes="project.xml" goals="jar:install" banner="Build and Install the Struts Portlet SPI jar" postProcessing="false" ignoreFailures="false"/> <maven:reactor basedir="${basedir}/framework" includes="project.xml" goals="jar:install" banner="Build and Install the Struts Portlet jar" postProcessing="false" ignoreFailures="false"/> </goal> </project> 1.1 jakarta-jetspeed-2/struts-portlet/checkstyle.license Index: checkstyle.license =================================================================== /* * Copyright (\d\d\d\d-)+2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ 1.1 jakarta-jetspeed-2/struts-portlet/.project Index: .project =================================================================== <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>struts-portlet</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> 1.1 jakarta-jetspeed-2/struts-portlet/.encoding Index: .encoding =================================================================== tld/struts-portlet.tld:UTF-8 spi/maven.xml:UTF-8 maven.xml:UTF-8 1.1 jakarta-jetspeed-2/struts-portlet/.classpath Index: .classpath =================================================================== <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry excluding="**/CVS*" kind="src" path="spi/src/java"/> <classpathentry excluding="**/CVS/*" kind="src" path="framework/src/java"/> <classpathentry excluding="**/CVS/*" kind="src" path="demo/src/java"/> <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"/> <classpathentry kind="var" path="MAVEN_REPO/portlet-api/jars/portlet-api-1.0.jar"/> <classpathentry kind="var" path="MAVEN_REPO/struts/jars/struts-1.2.1-dev-20040407.jar"/> <classpathentry kind="var" path="MAVEN_REPO/jetspeed2/jars/jetspeed-commons-2.0-a1-dev.jar"/> <classpathentry kind="var" path="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.6.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-2.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/commons-digester/jars/commons-digester-1.5.jar"/> <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-2.0.jar"/> <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.3.jar"/> <classpathentry kind="var" path="MAVEN_REPO/commons-validator/jars/commons-validator-1.1.2.jar"/> <classpathentry kind="var" path="MAVEN_REPO/antlr/jars/antlr-2.7.2.jar"/> <classpathentry kind="var" path="MAVEN_REPO/oro/jars/oro-2.0.7.jar"/> <classpathentry kind="var" path="MAVEN_REPO/struts-portlet/jars/struts-portlet-spi-0.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/struts-portlet/jars/struts-portlet-0.1.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="bin"/> </classpath> 1.1 jakarta-jetspeed-2/struts-portlet/project.xml Index: project.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <project> <pomVersion>3</pomVersion> <id>struts-portlet</id> <name>Apache Struts Portlet Framework</name> <groupId>struts-portlet</groupId> <currentVersion>0.1</currentVersion> <description> Apache Struts Portlet Framework </description> <shortDescription>Apache Struts Portlet Framework</shortDescription> <developers> <developer> <name>Ate Douma</name> <id>ate</id> <email>[EMAIL PROTECTED]</email> <roles> <role>Java Developer</role> </roles> </developer> </developers> <build> <sourceDirectory>src</sourceDirectory> </build> </project> 1.1 jakarta-jetspeed-2/struts-portlet/checkstyle.xml Index: checkstyle.xml =================================================================== <?xml version="1.0"?> <!-- Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd"> <!-- Checkstyle properties for Cactus projects --> <module name="Checker"> <module name="NewlineAtEndOfFile"/> <module name="TreeWalker"> <!-- General file checks --> <module name="FileLength"/> <module name="RegexpHeader"> <property name="headerFile" value="${checkstyle.header.file}"/> <property name="ignoreLines" value="4"/> </module> <module name="LineLength"> <property name="ignorePattern" value="(@version|@see|^import)"/> </module> <module name="TabCharacter"/> <!-- Imports --> <module name="AvoidStarImport"/> <module name="IllegalImport"/> <module name="RedundantImport"/> <module name="UnusedImports"/> <!-- Naming conventions --> <module name="ConstantName"/> <module name="MemberName"/> <module name="MethodName"/> <module name="LocalFinalVariableName"/> <module name="LocalVariableName"/> <module name="PackageName"/> <module name="ParameterName"> <property name="format" value="^(the|is|has)[A-Z][a-zA-Z0-9]*$"/> </module> <module name="StaticVariableName"/> <module name="TypeName"/> <!-- Code formatting --> <module name="EmptyBlock"> <property name="tokens" value="LITERAL_CATCH"/> <property name="option" value="text"/> </module> <module name="NeedBraces"/> <module name="NoWhitespaceAfter"/> <module name="NoWhitespaceBefore"/> <module name="NoWhitespaceAfter"> <property name="tokens" value="DOT"/> <property name="allowLineBreaks" value="true"/> </module> <module name="NoWhitespaceBefore"> <property name="tokens" value="DOT"/> <property name="allowLineBreaks" value="true"/> </module> <module name="OperatorWrap"/> <module name="LeftCurly"> <property name="option" value="nl"/> </module> <module name="RightCurly"> <property name="option" value="alone"/> </module> <module name="WhitespaceAfter"/> <module name="WhitespaceAround"/> <!-- Coding style --> <module name="EqualsHashCode"/> <module name="IllegalInstantiation"> <property name="classes" value="java.lang.Boolean, java.lang.String"/> </module> <module name="InnerAssignment"/> <module name="MethodLength"/> <module name="MissingSwitchDefault"/> <module name="ModifierOrder"/> <module name="ParameterNumber"/> <module name="ParenPad"/> <module name="RedundantModifier"/> <module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanReturn"/> <module name="UpperEll"/> <module name="VisibilityModifier"> <property name="protectedAllowed" value="true"/> <property name="publicMemberPattern" value="^[a-z][a-zA-Z0-9]*$"/> </module> <module name="FinalClass"/> <!-- Avoid finalizers (this will not find violations that contain linebreaks) --> <module name="GenericIllegalRegexp"> <property name="format" value="((public)|(protected))\s+void\s+finalize\(\s*\)"/> <property name="message" value="Avoid finalizers"/> </module> <!-- No direct printing to System.out or System.err --> <module name="GenericIllegalRegexp"> <property name="format" value="System\.(out|err)\."/> <property name="message" value="Don't write directly to System.out our System.err"/> </module> <!-- No @author tags --> <module name="GenericIllegalRegexp"> <property name="format" value="@author"/> <property name="message" value="No @author tag allowed"/> </module> <!-- Javadoc related checks --> <module name="JavadocType"> <property name="scope" value="private"/> <!--property name="authorFormat" value=""/--> <property name="versionFormat" value="\$Id.*\$"/> </module> <module name="JavadocMethod"> <property name="scope" value="private"/> <property name="allowUndeclaredRTE" value="true"/> </module> <module name="JavadocVariable"> <property name="scope" value="private"/> </module> </module> </module> 1.1 jakarta-jetspeed-2/struts-portlet/README.txt Index: README.txt =================================================================== Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Struts Portlet Framework: This is the initial version of a small framework to allow Struts to be used as Action handler and context renderer within a portlet. It's far from complete yet but already the standard MailReader example application does run nicely under Jetspeed 2. This example application can be found under the demo folder. Documentation I haven't really written yet (you're looking at all there is right now) but will be provided as soon as possible. Overview: The problem with embedding Struts within a portlet is that Struts processes action handling and view rendering all in one event. To be able to use Struts the framework creates a *virtual* servlet context in which it intercepts the Struts processing after its action handling and postpones the view rendering to the portlet RenderRequest. To be able to do this *right* a Struts portlet application needs to follow some rules. Not every Struts application will run out of the box! A Struts page url within the portlet is encoded as a portlet render parameter. To be able to target a different page, adapted versions of the <html:form> and <html:link> tags are supplied (taglib struts-portlet.tld). These will generated a PortletURL with the target page correctly encoded as (action) parameter. Other Struts tags will have to be adapted as well but only these are done for now. Assumptions, restrictions and features: All user interactions go through actions. Direct jsp access by the user will break the framework. This is already *recommended* for any Struts application so this should be not a big problem. Enforce this by storing all jsp files beneath WEB-INF. Struts page url's may not contain '|' or '$' characters. These are currently used to encode a page url to be able to use it as a render parameter. No direct output rendering from an action. All output should be rendered from an ActionForward after action processing. After an action the resulting view rendering ActionForward is included, forwarded or redirected to by Struts. The framework will intercept this and postpone the actual rendering to the RenderRequest event of the portlet. For an include or forward the current Struts context will be temporarily saved in a StrutsRenderContext object in the session. This contains the actual render path, the current ActionMapping, ActionForm, ActionMessages and errors (if defined). For a redirect just the new Struts page url will be set (note: these ActionForwards need to point at an action mapping, NOT a jsp). During a RenderRequest the framework will send Struts once again through the same processing path but will intercept before it will actually start checking/validating parameters. It'll then check if a StrutsRenderContext is available. If so, the context will be loaded into the request context and the saved ActionForward path will now be included (forwards are not allowed in portlets). Otherwise Struts will just continue processing (but won't have any parameters to process). The consequence of this solution is that input action chaining isn't supported (atleat not yet). So action processing realy should be done in one action only. Furthermore, view rendering should normally NOT be dependent on request scope input parameters. This is supported by the StrutsRenderContext (which ONLY saves the ActionForm and messages and currently NO other parameters or attributes) but really only meant for handling validation errors and will only work once (refreshing after a validation error will clear any input /errormessage). A proper MVC implementation should already give you that by the way. If input state has to be preserved beyond one request, session scope ActionForms and ActionMessages stored in the session (supported since Struts 1.2) should be used. To get the proper flow, ActionForwards used after a successfull action processing really should define redirect="true". Struts will normaly forward back to the error page after a validation error. The input attribute of the actionmapping is used for that. But this normally is pointing to a ActionForward directed at an jsp or pointing to a jsp itself. That won't do using this framework. Therefore the page url requesting the action is saved by the struts-portlet tags as well. If after an action processing errors are found the framework will ignore the input page url but uses its own saved url. One thing which the framework supports will formally this is not allowed in a portlet is accepting response.sendError() calls. During ActionRequest processing the error code (and optional message) are saved in a StrutsErrorContext. When the RenderRequest comes along an error page will be rendered (currently embedded within StrutsPortlet). A page refresh will bring up the current Struts page again. Futhermore, any non-handled exception will end up on that *catch-all* error page. Usage: - run maven install (default goal so just maven will do) This will build and install (in your local maven repository) two jars: - struts-portlet-spi-<version>.jar - struts-portlet-<version>.jar The spi jar only contains the StrutsServletContextProvider interface. This interface has to be implemented for a specific portal and gives the struts-portlet access to the servlet context its running in. For J2 this has already been done: org.apache.jetspeed.portlet.StrutsServletContextProviderImpl and globabally available to any J2 portlet (embedded in the jetspeed-commons-<version>.jar located in Tomcat/shared/lib). The J2 implementation with J2 running under Tomcat 4.1.29 is the only one which has been tested so far. The other jar contains the framework classes. This jar has to be put in the WEB-INF/lib of a portlet. - create/modify web.xml: Define as action servlet: org.apache.struts.portlet.PortletServlet which extends org.apache.struts.action.ActionServlet. Define an extension mapping for the action servlet (*.do). Directory mapping is not supported. Add the struts-portlet.tld taglib. The .tld can be found in folder tld. - create/modify portlet.xml: Use as portlet-class: org.apache.struts.portlet.StrutsPortlet Define the following init-param elements: - name: ServletContextProvider value: org.apache.jetspeed.portlet.StrutsServletContextProviderImpl (or one of your own if not using J2) required: yes - name: ViewPage value: <action mapping> to welcome page like: /welcome.do or /index.do (note the extension: jsp's won't do) required: yes The welcome file list from web.xml is not used! - name: EditPage value: <action mapping> to default edit page required: no, default taken from ViewPage - name: HelpPage value: <action mapping> to default help page required: no, default taken from ViewPage - name: ActionPage value: <action mapping> to default action page required: no, default taken from ViewPage - Use the right struts.jar and its .tld files. The framework is developed against the nightly build of 20040407. Anything after that will probably/hopefully work. - Copy the struts-portlet.tld from this project to your tld folder. - modify struts-config.xml: Define as controller processorClass: org.apache.struts.portlet.PortletRequestProcessor. Note, tiles usage isn't possible yet (probably won't be difficult to support so maybe soon). - replace all struts tags which generate action urls: The struts-portlet.tld currently contains adaptions for <html:form> and <html:link>. Others will need to be provided later. These adapted tags ensures the correct portlet url's will be generated. - replace remote javascript retrieval ( <javascript src="url"/> with <struts-portlet:script src="url"/> for the same reason as above. - setup the actions and mappings with respect to the above mentioned assumptions and restrictions. Demo: As example implementation and proof of concept the Struts MailReader example application (from nightly build 20040407) is is converted to a Struts portlet. The example has been modified on the following points: - all jsp files and the tour.html are moved below WEB-INF in folder view. - the <html:form> and <html:link> tags are replaced by their struts-portlet versions - the remote javascript tags (for validation) are replaced by the struts-portlet script tag - the welcome file index.jsp is removed (not needed anymore and did issue an illegal forward anyway) - the CheckLogonTag has been removed: This one issued an illegal forward when the user wasn't logged on. Besided being *bad* practice to do flow control during view rendering having moved the jsp files below the WEB-INF now enforced action processing anyway so the check is done now appropriately there. - The struts-config files (there are two) are modified according the above rules. - Logoff doesn't invalidate the session anymore which could interfere with the current session implementation in J2 (which as far as I know is shared between all portlets, not sure if that's according to the specs though). Known issues: - JS2-11 (http://nagoya.apache.org/jira/browse/JS2-11) currently requires web-app_2_3.dtd to be available from the working directory when deploying the demo application. [FIXED 2004-04-19 DST] - JS2-14 (http://nagoya.apache.org/jira/browse/JS2-14) breaks the local anchor references in the tour. [FIXED 2004-04-19 DST] To build and deploy navigate to the demo folder and run (make sure the production database is running): maven deploy Note that the project.properties in the demo folder should be adapted to your environment first! Undeploy using: maven undeploy During deployment/undeployment an example portlet-entity is inserted/removed from the database using ID 15 (the next one available if just the jetspeed demo portlets are all deployed). Under subfolder jetspeed an example struts-demo.psml and an extended Log4J.properties file can be found for testing the example under jetspeed. Simply copy these files over to your deployed jetspeed webapp folder. As the demo is configured for deployment under Jetspeed-2 a Struts Portlet SPI implementation will be available at runtime. To get it running under a different portal an implementation for StrutsServletContextProvider has to be provided. If its not delivered by the portal itself you can try to define one yourself and include it in the demo together with the spi jar. 20040418, Ate Douma 1.1 jakarta-jetspeed-2/struts-portlet/LICENSE.TXT Index: LICENSE.TXT =================================================================== Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2004 The Apache Software Foundation --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]