stefano     00/07/21 13:09:02

  Modified:    xdocs    connection-pool.xml dynamic.xml guide.xml
                        installing.xml
  Log:
  a bunch of fixes
  
  Revision  Changes    Path
  1.3       +16 -10    xml-cocoon/xdocs/connection-pool.xml
  
  Index: connection-pool.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/xdocs/connection-pool.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- connection-pool.xml       2000/07/11 04:42:15     1.2
  +++ connection-pool.xml       2000/07/21 20:08:53     1.3
  @@ -109,6 +109,7 @@
       in your own code. To demonstrate this, I'll show an example how I 
modified
       Ricardo Rocha's excellent example XSQL. this is some of the code that he
       had before:</p>
  +    
     <source><![CDATA[
       import java.sql.*;
       import java.util.*;
  @@ -146,7 +147,9 @@
               for (int j = 0; j &lt; columnCount; j++) {
                 String value = resultSet.getString(j + 1);
       
  -              Element element = 
factory.createElement(metaData.getColumnLabel(j + 1).toLowerCase());
  +              Element element = factory.createElement(
  +               metaData.getColumnLabel(j + 1).toLowerCase()
  +              );
                 row.appendChild(element);
       
                 if (value != null) {
  @@ -172,8 +175,8 @@
       
       }
       ]]></source>
  -    <p>Now this is the code modified (bold text) to use the Turbine
  -    conncection pool:</p>
  +    <p>Now this is the code modified to use the Turbine conncection pool:</p>
  +    
     <source><![CDATA[
       import java.sql.*;
       import java.util.*;
  @@ -181,7 +184,8 @@
       import DBConnectionManager;
       
       public class XSQL {
  -      <strong>static DBBroker pool = DBBroker.getInstance();</strong>  
  +        static DBBroker pool = DBBroker.getInstance();       // <---- Pool 
code!
  +        
           public static Element executeQuery(
           String connectionName,
           String statementId,
  @@ -191,10 +195,10 @@
           throws SQLException
         {
           Connection connection = null;
  -        <strong>DBConnection db = null;</strong>    
  +        DBConnection db = null;                              // <---- Pool 
code!
           try {
  -          <strong>db = pool.getConnection(connectionName);</strong>
  -          <strong>connection = db.getConnection();</strong>
  +          db = pool.getConnection(connectionName);           // <---- Pool 
code!
  +          connection = db.getConnection();                   // <---- Pool 
code!
             Statement statement = connection.createStatement();
             ResultSet resultSet = statement.executeQuery(statementText);
             ResultSetMetaData metaData = resultSet.getMetaData();
  @@ -211,7 +215,9 @@
               for (int j = 0; j &lt; columnCount; j++) {
                 String value = resultSet.getString(j + 1);
       
  -              Element element = 
factory.createElement(metaData.getColumnLabel(j + 1).toLowerCase());
  +              Element element = factory.createElement(
  +                metaData.getColumnLabel(j + 1).toLowerCase()
  +              );
                 row.appendChild(element);
       
                 if (value != null) {
  @@ -230,7 +236,7 @@
             throw(new SQLException(statementText));
           } finally {
             if (connection != null) {
  -              <strong>pool.releaseConnection(db);</strong>
  +            pool.releaseConnection(db);                      // <---- Pool 
code!
             }
           }
         }
  @@ -238,7 +244,7 @@
       }
       ]]></source>
       <p>Please see the <link 
href="http://java.apache.org/turbine/getting_started.html";>getting
  -    started</link> documentation at the <link 
href="http://java.apache.org/turbine";>Turbine</link>
  +    started</link> documentation at the <link 
href="http://java.apache.org/turbine/";>Turbine</link>
       homepage for more information about Turbine.
       </p>
     </s1>
  
  
  
  1.4       +2 -2      xml-cocoon/xdocs/dynamic.xml
  
  Index: dynamic.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/xdocs/dynamic.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- dynamic.xml       2000/04/27 17:55:15     1.3
  +++ dynamic.xml       2000/07/21 20:08:54     1.4
  @@ -149,9 +149,9 @@
     process the given servlet request and provide an output stream for reading 
the
     generated XML document.</p>
     
  -  <p>Note that Produce has also another method, 
<code>getDocument(request)</code>,
  +  <p>Note that DummyProducer has also another method, 
<code>getDocument(request)</code>,
     which is responsible to return directly a DOM tree. In case you need to 
render
  -  you servlet code Cocoon-aware, the above example should tell you what to 
do.</p>
  +  your servlet code Cocoon-aware, the above example should tell you what to 
do.</p>
     
     <p>Please, look at the shipped producers source code for example
     code and look at the <connect href="guide.xml">user guide</connect> on how 
to install and
  
  
  
  1.5       +1 -1      xml-cocoon/xdocs/guide.xml
  
  Index: guide.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/xdocs/guide.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- guide.xml 2000/05/18 21:52:51     1.4
  +++ guide.xml 2000/07/21 20:08:55     1.5
  @@ -183,7 +183,7 @@
   
   ]]></source>
   
  -  <p>would tell Cocoon to apply the <code>hello.text.xsl</code> stylesheet 
if the Lynx browser
  +  <p>would tell Cocoon to apply the <code>hello-text.xsl</code> stylesheet 
if the Lynx browser
     is requesting the page. This powerful feature allows you to design your 
content
     independently and to choose its presentation depending on the capabilities 
of the browser
     agent.</p>
  
  
  
  1.19      +123 -43   xml-cocoon/xdocs/installing.xml
  
  Index: installing.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/xdocs/installing.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- installing.xml    2000/06/21 22:05:33     1.18
  +++ installing.xml    2000/07/21 20:08:55     1.19
  @@ -54,7 +54,7 @@
   
     <p>
      In the <code>/bin</code> directory you'll find the <code>cocoon.jar</code>
  -   jar package that contains the Cocoon binary files, while the  
<code>/lib</code> 
  +   jar package that contains the Cocoon binary files, while the 
<code>/lib</code> 
      directory contains all the libraries required for complete Cocoon 
operation.
      While these packages may not be the most up-to-date versions, they are
      guaranteed and tested to work properly with Cocoon so, we suggest that you
  @@ -309,19 +309,44 @@
      </p>
   
      <note>
  -    Tomcat 3.0 has a bug that prevents Cocoon operation, please download
  -    a later version.
  +    Make sure that <code>xerces.jar</code> is located 
<strong>before</strong> 
  +    <code>xml.jar</code> otherwise Cocoon won't run. To do this, rename 
  +    <code>xml.jar</code> as <code>zxml.jar</code> to be placed later in
  +    alphabetical order.
      </note>
  -   
  -   <note>
  -    Due to DOM level1 and DOM level2 incompatibilities, make sure that <code>
  -    xerces.jar</code> is located <strong>before</strong> <code>xml.jar</code>
  -    since Xerces contains DOM2 (which is needed by Cocoon) while ProjectX 
  -    contains DOM1 (which will generate runtime exceptions with Cocoon).
  -   </note>
     </s2>
  +
  +<s2 title="Installing Cocoon on New Atlanta's ServletExec 2.2">
  +
  +<p>After you have obtained all the jar packages you need
  +(see the above section), you should add
  +them to your <code>Classpath.pref</code> file.
  +Then, add this to the <code>servlets.properties</code> file:</p>
  +
  +<source>servlet.Cocoon.code=org.apache.cocoon.Cocoon
  +servlet.Cocoon.initArgs=properties=/web/var/tmp/cocoon/cocoon.properties
  +</source>
  +
  +<p>and this to the <code>rules.properties</code> file:</p>
  +
  +<source>*.xml=Cocoon</source>
  +
  +<p>
  +to provide the initArgs and extension association for Cocoon.  Once
  +the web server is restarted to pick up the new configuration,
  +everything should work ok - try accessing the samples contained in the
  +distribution to see Cocoon in action or the /Cocoon.xml page for
  +Cocoon internal status.
  +</p>
   
  -  <s2 title="Installing Cocoon on BEA WebLogic">
  +<p>
  +You could also make these three configuration changes via
  + the servlet/admin GUI interface if you're not into editing files.
  +</p>
  +
  +</s2>
  +
  +  <s2 title="Installing Cocoon on BEA WebLogic (first recipe)">
      <p>
       After you have obtained all the jar packages you need (see the above
       section), you should add all of them (included the 
<code>cocoon.jar</code>
  @@ -356,38 +381,8 @@
      </p>
   
     </s2>
  -
  -<s2 title="Installing Cocoon on New Atlanta's ServletExec 2.2">
  -
  -<p>After you have obtained all the jar packages you need
  -(see the above section), you should add
  -them to your <code>Classpath.pref</code> file.
  -Then, add this to the <code>servlets.properties</code> file:</p>
  -
  -<source>servlet.Cocoon.code=org.apache.cocoon.Cocoon
  -servlet.Cocoon.initArgs=properties=/web/var/tmp/cocoon/cocoon.properties
  -</source>
  -
  -<p>and this to the <code>rules.properties</code> file:</p>
  -
  -<source>*.xml=Cocoon</source>
  -
  -<p>
  -to provide the initArgs and extension association for Cocoon.  Once
  -the web server is restarted to pick up the new configuration,
  -everything should work ok - try accessing the samples contained in the
  -distribution to see Cocoon in action or the /Cocoon.xml page for
  -Cocoon internal status.
  -</p>
  -
  -<p>
  -You could also make these three configuration changes via
  - the servlet/admin GUI interface if you're not into editing files.
  -</p>
  -
  -</s2>
  -
  -<s2 title="Installing Cocoon on BEA WebLogic">
  +  
  +<s2 title="Installing Cocoon on BEA WebLogic (second recipe)">
    <p>WLS 5.1 implements Servlet 2.2. so it plugs in easily. Here's a quick 
recipe:</p>
   
    <ul>
  @@ -438,6 +433,85 @@
   
   </s2>
   
  +  <s2 title="Installing Cocoon on JRun">
  +   <p>
  +     To configure JRun, you must set up both JRun and the web server
  +     of your choice to work with Cocoon.  We assume that you already
  +     have a generic JRun installation that works with your web server.
  +   </p>
  +   <p>
  +     For the JRun portion, you must add all Cocoon jars to the java.classpath
  +     in [jrun-home]/jsm-default/properties with something like:
  +   </p>
  +<source>java.classpath=[previous jrun jars]:[cocoon-home]/lib/xerces.jar:
  +[cocoon-home]/lib/stylebook.jar:[cocoon-home]/lib/fop.jar:
  +[cocoon-home]/bin/cocoon.jar:[cocoon-home]/lib/xalan.jar:
  +[cocoon-home]/lib/turbine-pool.jar</source>
  +   <p>
  +    Note that all newlines are added for readability and should not
  +    actually be in the configuration file.  All jars should be listed
  +    upon the same line. 
  +   </p>
  +
  +   <p>
  +    Now, modify 
[jrun-home]/jsm-default/services/jse/properties/rules.properties
  +    and add the line:
  +   </p>
  +
  +<source>*.xml=org.apache.cocoon.Cocoon</source>
  +
  +   <p>
  +    In [jrun-home]/jsm-default/services/jse/properties/servlets.properties,
  +    add the lines:
  +   </p>
  +
  
+<source>servlets.properties:servlet.org.apache.cocoon.Cocoon.code=org.apache.cocoon.Cocoon
  
+servlets.properties:servlet.org.apache.cocoon.Cocoon.args=properties=[cocoon-home]/conf/cocoon.properties
  +servlets.properties:servlet.org.apache.cocoon.Cocoon.preload=false</source>
  +
  +   <p>
  +    And finally, change the defaultdocs line in
  +    [jrun-home]/jsm-default/services/jse/properties/files.properties
  +    and add "index.xml" so that the line
  +    looks something like:
  +   </p>
  +
  +<source>defaultdocs=index.html,index.jsp,index.xml</source>
  +
  +   <p>
  +     Since JRun is web server independent, you must configure JRun and 
Cocoon to
  +     work with your webserver.  Again, we assume that you already have JRun
  +     installed and working for your particular webserver.  We give
  +     additional instructions only for making Cocoon work.
  +   </p>
  +
  +  <s3 title="Cocoon with JRun and Apache">
  +
  +   <p>
  +    Add the following to [apache path]/conf/httpd.conf
  +   </p>
  +
  +<source>Action cocoon /servlet/org.apache.cocoon.Cocoon
  +AddHandler cocoon xml
  +Alias /cocoon/ "[cocoon-home]"</source>
  +
  +   <p>
  +    The "Alias" line above is optional; but it will make
  +    testing the setup much easier.  To verify that all is working,
  +    make sure to test out the XSP demos.  If you get a
  +    java.lang.NoSuchMethodError: org.w3c.dom.Node error, try moving
  +    the xerces.jar to the front of JRun's java.classpath, restart
  +    JRun, and try the XSP again.
  +   </p>
  +
  +  </s3>
  +
  +  <s3 title="Cocoon with JRun and other web servers (iPlanet, IIS, etc)">
  +  <p>Add your sucessful installation method here.  Volunteers welcome!</p>
  +  </s3>
  +
  +  </s2>
  +
     <s2 title="Installing Cocoon on other platforms">
      <p>Yet to be written! <em>Volunteers welcome!</em></p>
     </s2>
  @@ -629,6 +703,12 @@
      <td>Windows NT 4.0 SP4</td>
      <td colspan="2">BEA WebLogic Server 5.1 SP3</td>
      <td>Sun JDK 1.2.2</td>
  +  </tr>
  +  <tr>
  +   <td>RedHat Linux 6.2 (i686)</td>
  +   <td>Apache 1.3.12 + mod_ssl 2.6.5</td>
  +   <td>JRun 2.3.3</td>
  +   <td>Sun JDK 1.2.2 Standard Edition</td>  
     </tr>
     </table>
   
  
  
  

Reply via email to