cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/webapp/docs/samples/forms add-employee.xsp employee.xsp process-department.xsp process-employee.xsp
Date Mon, 08 Jan 2001 15:30:13 GMT
bloritsch    01/01/08 07:30:12

  Modified:    src/org/apache/cocoon/components/datasource Tag: xml-cocoon2
                        JdbcDataSource.java
               src/org/apache/cocoon/servlet Tag: xml-cocoon2
                        CocoonServlet.java
               src/org/apache/cocoon/transformation Tag: xml-cocoon2
                        SQLTransformer.java
               webapp   Tag: xml-cocoon2 sitemap.xmap
               webapp/WEB-INF Tag: xml-cocoon2 web.xml
               webapp/docs/samples/forms Tag: xml-cocoon2 add-employee.xsp
                        employee.xsp process-department.xsp
                        process-employee.xsp
  Log:
  Fixed samples to use the DataSource.
  Changed the "force-load" parameter name to "load-class" (it works the same).
  Changed SQLTransformer to use "use-connection" when the parameter is
  available.
  Modified SQLTransformer code to be more correct (accessing static variables
  by ClassName.VARIABLE instead of instance.VARIABLE).
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +6 -6      xml-cocoon/src/org/apache/cocoon/components/datasource/Attic/JdbcDataSource.java
  
  Index: JdbcDataSource.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/datasource/Attic/JdbcDataSource.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- JdbcDataSource.java	2001/01/06 16:32:17	1.1.2.2
  +++ JdbcDataSource.java	2001/01/08 15:29:32	1.1.2.3
  @@ -19,7 +19,7 @@
    * The Default implementation for DataSources in Cocoon.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/01/06 16:32:17 $
  + * @version CVS $Revision: 1.1.2.3 $ $Date: 2001/01/08 15:29:32 $
    */
   public class JdbcDataSource implements DataSourceComponent {
       String dburl;
  @@ -36,11 +36,11 @@
           this.passwd = conf.getChild("password").getValue();
   
           try {
  -	        if (user.equals("")) {
  -	            this.dbConnection = DriverManager.getConnection(dburl);
  -	        } else {
  -	            this.dbConnection = DriverManager.getConnection(dburl, user, passwd);
  -	        }
  +            if (user.equals("")) {
  +                this.dbConnection = DriverManager.getConnection(dburl);
  +            } else {
  +                this.dbConnection = DriverManager.getConnection(dburl, user, passwd);
  +            }
           } catch (Exception e) {
               log.error("Could not connect to Database", e);
               throw new ConfigurationException("Could not connect to Database", e);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.43  +8 -8      xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java,v
  retrieving revision 1.1.4.42
  retrieving revision 1.1.4.43
  diff -u -r1.1.4.42 -r1.1.4.43
  --- CocoonServlet.java	2001/01/06 16:32:20	1.1.4.42
  +++ CocoonServlet.java	2001/01/08 15:29:39	1.1.4.43
  @@ -53,7 +53,7 @@
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:nicolaken@supereva.it">Nicola Ken Barozzi</a> Aisa
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.4.42 $ $Date: 2001/01/06 16:32:20 $
  + * @version CVS $Revision: 1.1.4.43 $ $Date: 2001/01/08 15:29:39 $
    */
   
   public class CocoonServlet extends HttpServlet {
  @@ -96,7 +96,7 @@
   
           this.setClassPath(conf.getInitParameter("classpath-attribute"), this.context);
   
  -        this.forceLoad(conf.getInitParameter("driver"));
  +        this.forceLoad(conf.getInitParameter("load-class"));
   
           this.workDir = (File) this.context.getAttribute("javax.servlet.context.tempdir");
   
  @@ -165,12 +165,12 @@
                   final String localClasspath = classpathTokenizer.nextToken().trim();
   
                   if (localClasspath != null) {
  -	                if (buildClassPath.length() > 0) {
  -	                    buildClassPath.append(";");
  -	                }
  -	
  -	                log.debug("Using attribute: " + localClasspath.trim());
  -	                buildClassPath.append((String) context.getAttribute(localClasspath.trim()));
  +                    if (buildClassPath.length() > 0) {
  +                        buildClassPath.append(";");
  +                    }
  +
  +                    log.debug("Using attribute: " + localClasspath.trim());
  +                    buildClassPath.append((String) context.getAttribute(localClasspath.trim()));
                   }
               }
           }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.16  +95 -74    xml-cocoon/src/org/apache/cocoon/transformation/Attic/SQLTransformer.java
  
  Index: SQLTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/transformation/Attic/SQLTransformer.java,v
  retrieving revision 1.1.2.15
  retrieving revision 1.1.2.16
  diff -u -r1.1.2.15 -r1.1.2.16
  --- SQLTransformer.java	2000/12/11 15:06:10	1.1.2.15
  +++ SQLTransformer.java	2001/01/08 15:29:45	1.1.2.16
  @@ -20,7 +20,13 @@
   import java.util.Enumeration;
   
   import org.apache.avalon.Parameters;
  +import org.apache.avalon.ComponentManager;
  +import org.apache.avalon.ComponentManagerException;
  +import org.apache.avalon.ComponentSelector;
  +import org.apache.avalon.Composer;
   import org.apache.cocoon.ProcessingException;
  +import org.apache.cocoon.Roles;
  +import org.apache.cocoon.components.datasource.DataSourceComponent;
   import org.apache.cocoon.xml.XMLConsumer;
   import org.apache.cocoon.xml.XMLProducer;
   import org.apache.cocoon.util.ClassUtils;
  @@ -41,10 +47,10 @@
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
    * @author <a href="mailto:giacomo.pati@pwr.ch">Giacomo Pati</a>
    *         (PWR Organisation & Entwicklung)
  - * @version CVS $Revision: 1.1.2.15 $ $Date: 2000/12/11 15:06:10 $ $Author: bloritsch $
  + * @version CVS $Revision: 1.1.2.16 $ $Date: 2001/01/08 15:29:45 $ $Author: bloritsch $
    */
   
  -public class SQLTransformer extends AbstractTransformer {
  +public class SQLTransformer extends AbstractTransformer implements Composer {
   
       private Logger log = LogKit.getLoggerFor("cocoon");
   
  @@ -54,7 +60,7 @@
   
       /** The SQL namespace element names **/
       public static final String MAGIC_EXECUTE_QUERY = "execute-query";
  -    public static final String MAGIC_DRIVER = "driver";
  +    public static final String MAGIC_CONNECTION = "use-connection";
       public static final String MAGIC_DBURL = "dburl";
       public static final String MAGIC_USERNAME = "username";
       public static final String MAGIC_PASSWORD = "password";
  @@ -87,7 +93,7 @@
       protected String current_name;
   
       /** The current state of the event receiving FSM **/
  -    protected int current_state = STATE_OUTSIDE;
  +    protected int current_state = SQLTransformer.STATE_OUTSIDE;
   
       /** The value of the value element we're currently receiving **/
       protected StringBuffer current_value = new StringBuffer();
  @@ -96,41 +102,52 @@
       protected XMLConsumer xml_consumer;
       protected LexicalHandler lexical_handler;
   
  +    protected ComponentSelector dbSelector = null;
  +
  +    public void compose(ComponentManager manager) {
  +        try {
  +            this.dbSelector = (ComponentSelector) manager.lookup(Roles.DB_CONNECTION);
  +        } catch (ComponentManagerException cme) {
  +            this.log.warn("Could not get the DataSource Selector", cme);
  +        }
  +    }
  +
       /** BEGIN SitemapComponent methods **/
   
       public void setup(EntityResolver resolver, Map objectModel,
                         String source, Parameters parameters)
       throws ProcessingException, SAXException, IOException {
  -        current_state = STATE_OUTSIDE;
  +        current_state = SQLTransformer.STATE_OUTSIDE;
   
  -        // Check the driver
  -        String parameter = parameters.getParameter("driver",null);
  +        // Check for connection
  +        String parameter = parameters.getParameter(SQLTransformer.MAGIC_CONNECTION, null);
           if (parameter != null) {
  -            log.debug("DRIVER: "+parameter);
  +            log.debug("CONNECTION: "+parameter);
   
  -            default_properties.setProperty("driver",parameter);
  -        }
  +            default_properties.setProperty(SQLTransformer.MAGIC_CONNECTION, parameter);
  +        } else {
   
  -        // Check the dburl
  -        parameter = parameters.getParameter("dburl",null);
  -        if (parameter != null) {
  -            log.debug("DBURL: "+parameter);
  +            // Check the dburl
  +            parameter = parameters.getParameter(SQLTransformer.MAGIC_DBURL,null);
  +            if (parameter != null) {
  +                log.debug("DBURL: "+parameter);
   
  -            default_properties.setProperty("dburl",parameter);
  -        }
  +                default_properties.setProperty(SQLTransformer.MAGIC_DBURL,parameter);
  +            }
   
  -        // Check the username
  -        parameter = parameters.getParameter("username",null);
  -        if (parameter != null) {
  -            log.debug("USERNAME: "+parameter);
  +            // Check the username
  +            parameter = parameters.getParameter(SQLTransformer.MAGIC_USERNAME,null);
  +            if (parameter != null) {
  +                log.debug("USERNAME: "+parameter);
   
  -            default_properties.setProperty("username",parameter);
  -        }
  +                default_properties.setProperty(SQLTransformer.MAGIC_USERNAME,parameter);
  +            }
   
  -        // Check the password
  -        parameter = parameters.getParameter("password",null);
  -        if (parameter != null) {
  -            default_properties.setProperty("password",parameter);
  +            // Check the password
  +            parameter = parameters.getParameter(SQLTransformer.MAGIC_PASSWORD,null);
  +            if (parameter != null) {
  +                default_properties.setProperty(SQLTransformer.MAGIC_PASSWORD,parameter);
  +            }
           }
   
       }
  @@ -149,7 +166,7 @@
           try {
               query.execute();
           } catch (SQLException e) {
  -            log.debug("SQLTransformer", e);
  +            log.debug("SQLTransformer.executeQuery()", e);
               throw new SAXException(e);
           }
           this.start(query.rowset_name, attr);
  @@ -163,7 +180,7 @@
                   this.end(query.row_name);
               }
           } catch (SQLException e) {
  -            log.debug("SQLTransformer", e);
  +            log.debug("SQLTransformer.executeQuery()", e);
               throw new SAXException(e);
           }
           this.end(query.rowset_name);
  @@ -176,12 +193,12 @@
   
       protected void startExecuteQueryElement() {
           switch (current_state) {
  -            case STATE_OUTSIDE:
  -            case STATE_INSIDE_EXECUTE_QUERY_ELEMENT:
  +            case SQLTransformer.STATE_OUTSIDE:
  +            case SQLTransformer.STATE_INSIDE_EXECUTE_QUERY_ELEMENT:
                   current_query_index = queries.size();
                   Query query = new Query(this, current_query_index);
                   queries.addElement(query);
  -                current_state = STATE_INSIDE_EXECUTE_QUERY_ELEMENT;
  +                current_state = SQLTransformer.STATE_INSIDE_EXECUTE_QUERY_ELEMENT;
                   break;
               default:
                   throwIllegalStateException("Not expecting a start execute query element");
  @@ -190,10 +207,10 @@
   
       protected void startValueElement(String name) {
           switch (current_state) {
  -            case STATE_INSIDE_EXECUTE_QUERY_ELEMENT:
  +            case SQLTransformer.STATE_INSIDE_EXECUTE_QUERY_ELEMENT:
                   current_name = name;
                   current_value.setLength(0);
  -                current_state = STATE_INSIDE_VALUE_ELEMENT;
  +                current_state = SQLTransformer.STATE_INSIDE_VALUE_ELEMENT;
                   break;
               default:
                   throwIllegalStateException("Not expecting a start value element: "+
  @@ -203,11 +220,11 @@
   
       protected void startQueryElement(Attributes attributes) {
           switch (current_state) {
  -            case STATE_INSIDE_EXECUTE_QUERY_ELEMENT:
  +            case SQLTransformer.STATE_INSIDE_EXECUTE_QUERY_ELEMENT:
                   current_value.setLength(0);
  -                current_state = STATE_INSIDE_QUERY_ELEMENT;
  +                current_state = SQLTransformer.STATE_INSIDE_QUERY_ELEMENT;
                   String isupdate =
  -                    attributes.getValue("", MAGIC_UPDATE_ATTRIBUTE);
  +                    attributes.getValue("", SQLTransformer.MAGIC_UPDATE_ATTRIBUTE);
           if (isupdate != null && !isupdate.equalsIgnoreCase("false"))
                       getCurrentQuery().setUpdate(true);
                   break;
  @@ -218,7 +235,7 @@
   
       protected void endQueryElement() {
           switch (current_state) {
  -            case STATE_INSIDE_QUERY_ELEMENT:
  +            case SQLTransformer.STATE_INSIDE_QUERY_ELEMENT:
                   if (current_value.length() > 0) {
                       getCurrentQuery().addQueryPart(
                         current_value.toString());
  @@ -227,7 +244,7 @@
   
                       current_value.setLength(0);
                   }
  -                current_state = STATE_INSIDE_EXECUTE_QUERY_ELEMENT;
  +                current_state = SQLTransformer.STATE_INSIDE_EXECUTE_QUERY_ELEMENT;
                   break;
               default:
                   throwIllegalStateException("Not expecting a stop query element");
  @@ -236,14 +253,14 @@
   
       protected void endValueElement() {
           switch (current_state) {
  -            case STATE_INSIDE_VALUE_ELEMENT:
  +            case SQLTransformer.STATE_INSIDE_VALUE_ELEMENT:
                   getCurrentQuery().setParameter(current_name,
                                                  current_value.toString());
                   log.debug("SETTING VALUE ELEMENT name {"+
                                          current_name + "} value {"+
                                          current_value.toString() + "}");
   
  -                current_state = STATE_INSIDE_EXECUTE_QUERY_ELEMENT;
  +                current_state = SQLTransformer.STATE_INSIDE_EXECUTE_QUERY_ELEMENT;
                   break;
               default:
                   throwIllegalStateException("Not expecting an end value element");
  @@ -252,14 +269,14 @@
   
       protected void endExecuteQueryElement() throws SAXException {
           switch (current_state) {
  -            case STATE_INSIDE_EXECUTE_QUERY_ELEMENT:
  +            case SQLTransformer.STATE_INSIDE_EXECUTE_QUERY_ELEMENT:
                   if (current_query_index == 0) {
                       executeQuery(0);
                       queries.removeAllElements();
  -                    current_state = STATE_OUTSIDE;
  +                    current_state = SQLTransformer.STATE_OUTSIDE;
                   } else {
                       current_query_index--;
  -                    current_state = STATE_INSIDE_EXECUTE_QUERY_ELEMENT;
  +                    current_state = SQLTransformer.STATE_INSIDE_EXECUTE_QUERY_ELEMENT;
                   }
                   break;
               default:
  @@ -269,21 +286,21 @@
   
       protected void startAncestorValueElement(Attributes attributes) {
           switch (current_state) {
  -            case STATE_INSIDE_QUERY_ELEMENT:
  +            case SQLTransformer.STATE_INSIDE_QUERY_ELEMENT:
                   int level = 0;
                   try {
                       level = Integer.parseInt( attributes.getValue(my_uri,
  -                                              MAGIC_ANCESTOR_VALUE_LEVEL_ATTRIBUTE));
  +                                              SQLTransformer.MAGIC_ANCESTOR_VALUE_LEVEL_ATTRIBUTE));
                   } catch (Exception e) {
               log.debug("SQLTransformer", e);
                       throwIllegalStateException("Ancestor value elements must have a "+
  -                                               MAGIC_ANCESTOR_VALUE_LEVEL_ATTRIBUTE + "
attribute");
  +                                               SQLTransformer.MAGIC_ANCESTOR_VALUE_LEVEL_ATTRIBUTE
+ " attribute");
                   }
                   String name = attributes.getValue(my_uri,
  -                                                  MAGIC_ANCESTOR_VALUE_NAME_ATTRIBUTE);
  +                                                  SQLTransformer.MAGIC_ANCESTOR_VALUE_NAME_ATTRIBUTE);
                   if (name == null) {
                       throwIllegalStateException("Ancestor value elements must have a "+
  -                                               MAGIC_ANCESTOR_VALUE_NAME_ATTRIBUTE + "
attribute");
  +                                               SQLTransformer.MAGIC_ANCESTOR_VALUE_NAME_ATTRIBUTE
+ " attribute");
                   }
                   AncestorValue av = new AncestorValue(level, name);
                   log.debug("ANCESTOR VALUE "+level + " "+name);
  @@ -297,7 +314,7 @@
                       current_value.setLength(0);
                   }
                   getCurrentQuery().addQueryPart(av);
  -                current_state = STATE_INSIDE_ANCESTOR_VALUE_ELEMENT;
  +                current_state = SQLTransformer.STATE_INSIDE_ANCESTOR_VALUE_ELEMENT;
                   break;
               default:
                   throwIllegalStateException("Not expecting a start ancestor value element");
  @@ -305,7 +322,7 @@
       }
   
       protected void endAncestorValueElement() {
  -        current_state = STATE_INSIDE_QUERY_ELEMENT;
  +        current_state = SQLTransformer.STATE_INSIDE_QUERY_ELEMENT;
       }
   
       protected Query getCurrentQuery() {
  @@ -335,11 +352,11 @@
           }
           log.debug("RECEIVED START ELEMENT "+name);
   
  -        if (name.equals(MAGIC_EXECUTE_QUERY)) {
  +        if (name.equals(SQLTransformer.MAGIC_EXECUTE_QUERY)) {
               startExecuteQueryElement();
  -        } else if (name.equals(MAGIC_QUERY)) {
  +        } else if (name.equals(SQLTransformer.MAGIC_QUERY)) {
               startQueryElement(attributes);
  -        } else if (name.equals(MAGIC_ANCESTOR_VALUE)) {
  +        } else if (name.equals(SQLTransformer.MAGIC_ANCESTOR_VALUE)) {
               startAncestorValueElement(attributes);
           } else {
               startValueElement(name);
  @@ -355,13 +372,13 @@
           log.debug("RECEIVED END ELEMENT "+name + "("+uri +
                                  ")");
   
  -        if (name.equals(MAGIC_EXECUTE_QUERY)) {
  +        if (name.equals(SQLTransformer.MAGIC_EXECUTE_QUERY)) {
               endExecuteQueryElement();
  -        } else if (name.equals(MAGIC_QUERY)) {
  +        } else if (name.equals(SQLTransformer.MAGIC_QUERY)) {
               endQueryElement();
  -        } else if (name.equals(MAGIC_ANCESTOR_VALUE)) {
  +        } else if (name.equals(SQLTransformer.MAGIC_ANCESTOR_VALUE)) {
               endAncestorValueElement();
  -        } else if (name.equals(MAGIC_VALUE) || current_state == STATE_INSIDE_VALUE_ELEMENT)
{
  +        } else if (name.equals(SQLTransformer.MAGIC_VALUE) || current_state == SQLTransformer.STATE_INSIDE_VALUE_ELEMENT)
{
               endValueElement();
           } else {
               super.endElement(uri, name, raw);
  @@ -370,8 +387,8 @@
   
       public void characters(char ary[], int start,
                              int length) throws SAXException {
  -        if (current_state != STATE_INSIDE_VALUE_ELEMENT &&
  -                current_state != STATE_INSIDE_QUERY_ELEMENT) {
  +        if (current_state != SQLTransformer.STATE_INSIDE_VALUE_ELEMENT &&
  +                current_state != SQLTransformer.STATE_INSIDE_QUERY_ELEMENT) {
               super.characters(ary, start, length);
           }
           log.debug("RECEIVED CHARACTERS: "+
  @@ -463,19 +480,16 @@
           }
   
           protected void execute() throws SQLException {
  -            String driver = properties.getProperty(transformer.MAGIC_DRIVER);
  -            try {
  -                ClassUtils.newInstance(driver);
  -            } catch (Exception e) {log.debug("SQLTransformer", e);}
  -            if (null != properties.getProperty(transformer.MAGIC_DOC_ELEMENT)) {
  -                this.rowset_name = properties.getProperty(transformer.MAGIC_DOC_ELEMENT);
  +            if (null != properties.getProperty(SQLTransformer.MAGIC_DOC_ELEMENT)) {
  +                this.rowset_name = properties.getProperty(SQLTransformer.MAGIC_DOC_ELEMENT);
               }
  -            if (null != properties.getProperty(transformer.MAGIC_ROW_ELEMENT)) {
  -                this.row_name = properties.getProperty(transformer.MAGIC_ROW_ELEMENT);
  +            if (null != properties.getProperty(SQLTransformer.MAGIC_ROW_ELEMENT)) {
  +                this.row_name = properties.getProperty(SQLTransformer.MAGIC_ROW_ELEMENT);
               }
  -            String dburl = properties.getProperty(transformer.MAGIC_DBURL);
  -            String username = properties.getProperty(transformer.MAGIC_USERNAME);
  -            String password = properties.getProperty(transformer.MAGIC_PASSWORD);
  +            String connection = properties.getProperty(SQLTransformer.MAGIC_CONNECTION);
  +            String dburl = properties.getProperty(SQLTransformer.MAGIC_DBURL);
  +            String username = properties.getProperty(SQLTransformer.MAGIC_USERNAME);
  +            String password = properties.getProperty(SQLTransformer.MAGIC_PASSWORD);
               Enumeration enum = query_parts.elements();
               StringBuffer sb = new StringBuffer();
               while (enum.hasMoreElements()) {
  @@ -497,11 +511,16 @@
               }
               String query = sb.toString();
               try {
  -                if (username == null || password == null) {
  -                    conn = DriverManager.getConnection(dburl);
  +                if (connection != null) {
  +                    DataSourceComponent datasource = (DataSourceComponent) dbSelector.select(connection);
  +                    conn = datasource.getConnection();
                   } else {
  -                    conn = DriverManager.getConnection(dburl, username,
  -                                                       password);
  +                    if (username == null || password == null) {
  +                        conn = DriverManager.getConnection(dburl);
  +                    } else {
  +                        conn = DriverManager.getConnection(dburl, username,
  +                                                           password);
  +                    }
                   }
                   st = conn.createStatement();
                   if (isupdate)
  @@ -514,6 +533,8 @@
                   log.error("Caught a SQLException", e);
                   conn.close();
                   throw e;
  +            } catch (ComponentManagerException cme) {
  +                log.error("Could not use connection: " + connection, cme);
               }
           }
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.33  +1 -4      xml-cocoon/webapp/Attic/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/webapp/Attic/sitemap.xmap,v
  retrieving revision 1.1.2.32
  retrieving revision 1.1.2.33
  diff -u -r1.1.2.32 -r1.1.2.33
  --- sitemap.xmap	2001/01/08 14:31:04	1.1.2.32
  +++ sitemap.xmap	2001/01/08 15:29:50	1.1.2.33
  @@ -252,10 +252,7 @@
      <map:match pattern="sql/*">
       <map:generate src="docs/samples/sql/{1}.xml"/>
       <map:transform type="sql">
  -      <parameter name="driver"   value="postgresql.Driver"/>
  -      <parameter name="dburl"    value="jdbc:postgresql://localhost/test"/>
  -      <parameter name="username" value="test"/>
  -      <parameter name="password" value="test"/>
  +      <parameter name="use-connection" value="personnel"/>
       </map:transform>
       <map:transform src="stylesheets/simple-sql2html.xsl"/>
       <map:serialize/>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.10  +1 -1      xml-cocoon/webapp/WEB-INF/Attic/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/webapp/WEB-INF/Attic/web.xml,v
  retrieving revision 1.1.2.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- web.xml	2001/01/06 16:32:23	1.1.2.9
  +++ web.xml	2001/01/08 15:29:55	1.1.2.10
  @@ -42,7 +42,7 @@
      <param-value>DEBUG</param-value>
     </init-param>
       <init-param>
  -      <param-name>driver</param-name>
  +      <param-name>load-class</param-name>
         <param-value>
           <!-- For IBM WebSphere: -->
           com.ibm.servlet.classloader.Handler
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +1 -4      xml-cocoon/webapp/docs/samples/forms/Attic/add-employee.xsp
  
  Index: add-employee.xsp
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/webapp/docs/samples/forms/Attic/add-employee.xsp,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- add-employee.xsp	2000/12/21 23:07:21	1.1.2.1
  +++ add-employee.xsp	2001/01/08 15:30:01	1.1.2.2
  @@ -14,10 +14,7 @@
           <para>Department:
             <select name="department">
         <esql:execute-query inner-method="no">
  -        <esql:driver>postgresql.Driver</esql:driver>
  -        <esql:dburl>jdbc:postgresql://localhost/test</esql:dburl>
  -        <esql:username>test</esql:username>
  -        <esql:password>test</esql:password>
  +        <esql:use-connection>personnel</esql:use-connection>
           <esql:query>select id, name from department_table order by name</esql:query>
           <esql:results>
   	  <option>
  
  
  
  1.1.2.2   +1 -4      xml-cocoon/webapp/docs/samples/forms/Attic/employee.xsp
  
  Index: employee.xsp
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/webapp/docs/samples/forms/Attic/employee.xsp,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- employee.xsp	2000/12/30 22:39:17	1.1.2.1
  +++ employee.xsp	2001/01/08 15:30:03	1.1.2.2
  @@ -20,10 +20,7 @@
                 onChange="top.location.href=window.location.pathname + '?employee=' + document.forms['EmployeeSelection'].employee.options[document.forms['EmployeeSelection'].employee.options.selectedIndex].value">
               <option value="0">-- New employee --</option>
               <esql:execute-query inner-method="no">
  -              <esql:driver>postgresql.Driver</esql:driver>
  -              <esql:dburl>jdbc:postgresql://localhost/test</esql:dburl>
  -              <esql:username>test</esql:username>
  -              <esql:password>test</esql:password>
  +              <esql:use-connection>personnel</esql:use-connection>
                 <esql:query>select id, department_id, name from employee_table order
by name</esql:query>
                 <esql:results>
                   <option>
  
  
  
  1.1.2.2   +1 -4      xml-cocoon/webapp/docs/samples/forms/Attic/process-department.xsp
  
  Index: process-department.xsp
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/webapp/docs/samples/forms/Attic/process-department.xsp,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- process-department.xsp	2000/12/21 23:07:21	1.1.2.1
  +++ process-department.xsp	2001/01/08 15:30:04	1.1.2.2
  @@ -19,10 +19,7 @@
       <title><xsp:expr>process</xsp:expr> Department Processed</title>
       <content>
         <esql:execute-query inner-method="no">
  -        <esql:driver>postgresql.Driver</esql:driver>
  -        <esql:dburl>jdbc:postgresql://localhost/test</esql:dburl>
  -        <esql:username>test</esql:username>
  -        <esql:password>test</esql:password>
  +        <esql:use-connection>personnel</esql:use-connection>
           <esql:query>
   	   select max(id) as maxid from department_table
   	</esql:query>
  
  
  
  1.1.2.2   +1 -4      xml-cocoon/webapp/docs/samples/forms/Attic/process-employee.xsp
  
  Index: process-employee.xsp
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/webapp/docs/samples/forms/Attic/process-employee.xsp,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- process-employee.xsp	2000/12/21 23:07:22	1.1.2.1
  +++ process-employee.xsp	2001/01/08 15:30:05	1.1.2.2
  @@ -21,10 +21,7 @@
       <title><xsp:expr>process</xsp:expr> Employee Processed</title>
       <content>
         <esql:execute-query inner-method="no">
  -        <esql:driver>postgresql.Driver</esql:driver>
  -        <esql:dburl>jdbc:postgresql://localhost/test</esql:dburl>
  -        <esql:username>test</esql:username>
  -        <esql:password>test</esql:password>
  +        <esql:use-connection>personnel</esql:use-connection>
           <esql:query>
   	   select max(id) as maxid from employee_table
   	</esql:query>
  
  
  

Mime
View raw message