cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Isabelle Boyer" <ibo...@capgemini.fr>
Subject Connection to database and stylesheet
Date Mon, 05 Mar 2001 09:39:32 GMT
Hi all,

I have a connection problem with a query to a SQL dataBase, named
"DB_NDSUSERS.
My query is ok but when Itested it 4 times, I have the following error
message :
com.jnetdirect.jsql.m: Failed connection:com.jnetdirect.jsql.m: This trial
license allows a maximum of 1 connections and 2 are already connected
url:jdbc:JSQLConnect://mars:1433/database=DB_NDSUSERS

I have tried to crease the number of connection in cocoon.properties in
section "Turbine DB Connection Pool" at line
processor.xsp.pool.database.default.maxConnections=100 instead of 3.

I use the servlet engine, "litewebserver" and jdk 1.3 in NT workstation.

So could you tell me what is the solution to have a unlimited connection to
the Database., what are cocoon 's properties I have to change or if this
error is included in the freeware ?

I have another request about the stylesheet. I want to use 2 differents
stylesheets in a xml document according to user's request.
Th syntax I use is as following :

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<xsp:page language="java"
          xmlns:ldap="http://www.apache.org/2000/LDAP"
          xmlns:xsp="http://www.apache.org/1999/XSP/Core">

<?cocoon-process type="xslt"?>
<?xml-stylesheet href="nds2-3.xsl" type="text/xsl"?>

<page>

    <xsp:logic>
    String all;

    if (request.getParameter("all") != null)
  {
       all = request.getParameter("all");
   }
   else
   {
        all = "";
    }

   String XSLRef="\"href=\"nds2-3.xsl\\\"";

   if ((all.compareTo("all") == 0))
  {
       XSLRef = "\"href=\"nds2-2.xsl\\\"";
  }
  else
  {
      XSLRef = "\"href=\"nds2-3.xsl\\\"";
  }


ument.appendChild( 
   document.createProcessingInstruction("xml-stylesheet",XSLRef+ "type=\"text/xsl\""));
       
    </xsp:logic>
  <ldap:execute-query>
   ...
  </ldap:execute-query>
</page>
</xsp:page>


But it is not working.As you can see, I put a default stylesheet to not have a blank in href
because it raise me an erro
r.
So could you give me an idea or another way to do this ?

Thanks in advance for your support and your help.

Best Regards,
Isabelle Boyer.


Mime
View raw message