Antwort: Cocoon's pooled db connection and/or ESQL logicsheet

2001-09-30 Thread gcasper


You don't need CallableStatements to execute stored procedures.
Callable Statement is just Java's way of supporting return values and
output parameters.
If all the SP gives you is a result set you could use Statement or
PreparedStatement as well.
So just try:

execute SP param1, param2

in you ESQL query

HTH
Guido




   
  
Alfredas   
  
Chmieliauskas  An: [EMAIL PROTECTED] 
  
 Thema:  Cocoon's pooled db connection 
and/or ESQL logicsheet  
   
  
28.09.2001 
  
20:07  
  
Bitte antworten
  
an cocoon-users
  
   
  
   
  



Hello,

I have to use pretty complex sql queries, thus I am using mssql stored
procedures (so that the queries are stored precompiled in the sql server
not the  java app/xsp page). ESQL logicsheet does not support calls to
stored procedures (CallableStatements), as I know it.
Is there a way I could use the cocoon's pooled connection (defined in
the properrties) instead of opening a new one "manually"? I know how to
do it with the ESQL, but could anyone tell me a workaround for my own
XSP-defined query.

Any hints, comments, experiences will be appreciated,

Alfredas


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>






-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




constructing transformers in Cocoon 2

2001-09-30 Thread Liam Morley

Here's the model I've been using for Cocoon 2:

Default generator. 2 transformers: 1 transformer that we've wrote that picks
up on certain elements and serves information from the database (via JDBC)
depending on which elements it is, and also the standard XSLT transformer.
Then, standard serializer.

Is that the kind of thing that other people are doing as well? We're not doing
anything with XSP or JSP or ESQL or other taglibs... and as the docs are still
alpha for Cocoon 2, I wanted to check and make sure I'm not reinventing the
wheel.

Liam Morley

<>
-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


RE: More ESQL problems

2001-09-30 Thread Luke Reeves
Title: Message



Yes, it's a reply 
to my own post.  Found the problem.  I moved the  
tags to inside a  like so:
    
    
 
java.lang.String 
useragent; 
java.lang.String fileid;
 
 
fileid = ;    
    
 And it worked just 
fine.
 
    Luke

  
  -Original Message-From: Luke Reeves 
  [mailto:[EMAIL PROTECTED]] Sent: October 1, 2001 1:25 
  AMTo: '[EMAIL PROTECTED]'Subject: More ESQL 
  problems
  Sorry to bother everyone again, but I've got another problem 
  with the ESQL logicsheet.  Here's the code: 
      
     
  select ID from counters where link =  
  request.getParameter("file")  
     
       
    
  java.lang.String useragent;  
  java.lang.String fileid;  
  fileid = ;     
   
  I'm trying to grab the ID column value and assign it to a Java 
  string object for use in a further object; my site is littered with this 
  methodology, and it usually works.  However this code gives me the 
  following error:
  java.lang.Exception: XSP Java Compiler: Compilation failed for 
  _download.java 373: Incompatible type for =. Can't 
  convert org.w3c.dom.Node to java.lang.String.  
  fileid =     
  ^ 1 error 
      at 
  org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.java:146) 
      at 
  org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:522) 
      at 
  org.apache.cocoon.Engine.handle(Engine.java:384) 
      at 
  org.apache.cocoon.Cocoon.service(Cocoon.java:183) 
      at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:588) 
      at 
  org.apache.jserv.JServConnection.processRequest(JServConnection.java:317) 
      at 
  org.apache.jserv.JServConnection.run(JServConnection.java:188) 
      at 
  java.lang.Thread.run(Thread.java:498) 
  Instead of grabbing the value of the column as a string, it 
  looks like the ESQL sheet is grabbing a Node object.  The code that's 
  generated by Cocoon is:
      java.lang.String 
  fileid; 
      fileid = 
  xspParentNode = xspCurrentNode; 
      xspNodeStack.push(xspParentNode); 
      xspCurrentNode = 
  document.createElement("esql:get-string"); 
      xspParentNode.appendChild(xspCurrentNode); 
  Anyone know why the ESQL taglib is so confused? Thanks! 
  
      Luke Reeves, 
  Director of Development     
  Oceanlake Commerce Inc. 
      [EMAIL PROTECTED] 


More ESQL problems

2001-09-30 Thread Luke Reeves
Title: More ESQL problems





Sorry to bother everyone again, but I've got another problem with the ESQL logicsheet.  Here's the code:


    
  select ID from counters where link = 
 request.getParameter("file")
 
  
    
 java.lang.String useragent;
 java.lang.String fileid;
 fileid = ;
    


I'm trying to grab the ID column value and assign it to a Java string object for use in a further object; my site is littered with this methodology, and it usually works.  However this code gives me the following error:

java.lang.Exception: XSP Java Compiler: Compilation failed for _download.java
373: Incompatible type for =. Can't convert org.w3c.dom.Node to java.lang.String.
 fileid = 
    ^
1 error



    at org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.java:146)
    at org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:522)
    at org.apache.cocoon.Engine.handle(Engine.java:384)
    at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)
    at org.apache.jserv.JServConnection.run(JServConnection.java:188)
    at java.lang.Thread.run(Thread.java:498)


Instead of grabbing the value of the column as a string, it looks like the ESQL sheet is grabbing a Node object.  The code that's generated by Cocoon is:

    java.lang.String fileid;


    fileid = xspParentNode = xspCurrentNode;
    xspNodeStack.push(xspParentNode);
    xspCurrentNode = document.createElement("esql:get-string");
    xspParentNode.appendChild(xspCurrentNode);


Anyone know why the ESQL taglib is so confused? Thanks!


    Luke Reeves, Director of Development
    Oceanlake Commerce Inc.
    [EMAIL PROTECTED]





RE: taglibs for stylesheets

2001-09-30 Thread Vadim Gritsenko

> -Original Message-
> From: Aurelien [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 30, 2001 8:46 AM
> To: [EMAIL PROTECTED]
> Subject: taglibs for stylesheets
>
>
> Hi,
>
> I just love the logicsheet mechanism. Now, I wondered wether it'd be
> possible to implement a similar mechanism for stylesheets. I'm writing
> an article on HTML table formatting (for twigs), and I realize that it
> could be very cool to have a, say,  tag that you
> could embed in your stylesheets.
>
> The tag could have attributes like "number_of_columns"
> "cell_background", "border_width", etc...
>
> On the web site I'm working on, there are lots of xsl generated tables,
> and cocoon2 today only allows me to edit an xsl file for each and every
> table I need to generate, and forces me to maintain as many xsl table
> formatting stylesheets as I have pages.
>
> How could this shortcoming be addressed ?

I do see several ways of solving your issue:
1. Use CSS2
It will allow you to keep , ,  tags with just one attribute - class,
or even less :)

2. Come up with common DTD for all your documents (e.g., introduce tag 
),
and use this DTD in all of your documents. Then, as the last transformation stage 
(right before
serializer), apply stylesheet which will transform your tags into HTML s.

3. If you love XSP, you should love this third way :)
You could generate XSLs using XSP mechanism. Just look at sub-sitemap examples.
But do not forget that it's in your interests to make XSL-generation pipelines 
cacheable,
otherwise performance will suffer.

Does this help?

Regards,
Vadim

>
> Aurélien
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




taglibs for stylesheets

2001-09-30 Thread Aurelien

Hi,

I just love the logicsheet mechanism. Now, I wondered wether it'd be 
possible to implement a similar mechanism for stylesheets. I'm writing 
an article on HTML table formatting (for twigs), and I realize that it 
could be very cool to have a, say,  tag that you 
could embed in your stylesheets.

The tag could have attributes like "number_of_columns" 
"cell_background", "border_width", etc...

On the web site I'm working on, there are lots of xsl generated tables, 
and cocoon2 today only allows me to edit an xsl file for each and every 
table I need to generate, and forces me to maintain as many xsl table 
formatting stylesheets as I have pages.

How could this shortcoming be addressed ?

Aurélien

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: XIncludeTransformer still not working

2001-09-30 Thread Jeremy Quinn

At 12:09 PM +0700 28/9/01, Andrew Answer wrote:
> xmlns:xsp="http://apache.org/xsp";
> xmlns:xinclude="http://www.w3.org/2001/XInclude";>
>
>   
>
>

As your page is an XSP, you _could_ use the xinclude tag of the util taglib.

However, if you want to use the XInclude Transformer, I believe you need to
provide an xml:base attribute.

ie. something like this:

http://apache.org/xsp";
xmlns:xinclude="http://www.w3.org/2001/XInclude";>






Hope this helps


regards Jeremy
-- 
   ___

   Jeremy Quinn   Karma Divers
   webSpace Design
HyperMedia Research Centre

   


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>