cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6654] New: - [PATCH] Getting Cocoon-2.0.1 working on BES 5
Date Mon, 25 Feb 2002 15:51:39 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6654>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6654

[PATCH] Getting Cocoon-2.0.1 working on BES 5

           Summary: [PATCH] Getting Cocoon-2.0.1 working on BES 5
           Product: Cocoon 2
           Version: 2.0.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: core
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: tjacyno@galasoft.net


===========================================================================
HOW-TO: Deploying the Cocoon-2.0.1 example within Borland Enterprise Server
===========================================================================

By following these steps, *most* of the cocoon demo webapp site should work.

1) Unpack the cocoon.war file into a working directory (<work_dir>).

2) Open the <work_dir>/WEB-INF/web.xml file and change
    <servlet-class>org.apache.cocoon.servlet.CocoonServlet</servlet-class>
to
    <servlet-class>org.apache.cocoon.servlet.ParanoidCocoonServlet</servlet-
class>

3) Within the same file, insert the following after the servlet-class
definition:
    <init-param>
      <param-name>lib-dir</param-name>
      <param-value>absolute_path_to_lib_dir</param-value>
    </init-param>
where "absolute_path_to_lib_dir" could be: <work_dir>\WEB-INF\lib.  This
directory *has* to contain the unpacked jars found within the war file.

4) Unpack the <work_dir>\WEB-INF\lib\cocoon-2.0.1.jar into a temporary
directory.
- In order to get most of the site to work, replace the
org/apache/cocoon/environment/AbstractEnvironment.class file with the supplied
patch.
- In order to get internationalization to work, also replace the
org/apache/cocoon/transformation/I18nTransformer.class with the supplied
patch.

5) Re-jar the modified cocoon-2.0.1 files, and replace the
<work_dir>\WEB-INF\lib\cocoon-2.0.1.jar with the new one.

6) Re-war the files in <work_dir>, and deploy the resulting package.  Do *not*
delete <work_dir> as it now contains the required jar directory (unless you
specified another directory).



=================
Patch Description
=================

org/apache/cocoon/environment/AbstractEnvironment
-------------------------------------------------
The following code was added within the changeContext(String, String) method
at line 216:

//if the resource is jndi reference (e.g. BES temp deployment)
} else if (this.context.getProtocol().equals("jndi")) {
    String fullContext = this.context.toString() + newContext;
    if (!fullContext.endsWith("/")) {
    	fullContext = fullContext.substring(0, fullContext.lastIndexOf('/') + 
1);
    }
    this.context = new URL(fullContext);


org/apache/cocoon/transformation/I18nTransformer
------------------------------------------------
Lines 789-793 were commented out within the _setup(SourceResolver, String)
method:
//if (!systemId.startsWith(FILE)) {
//    throw new ResourceNotFoundException(
//        systemId + " does not denote a directory"
//    );
//}



======
Theory
======

Cocoon seems to have been designed in order to use conventional file system 
structures.  BES, on the other hand, uses jndi URL references almost 
exclusively.  Problems are bound to occur, but should be solvable on a case-by-
case bases.  For now, I have done the strict minimum, but I would be happy to 
post updates as they become available.

Good luck.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message