Re: C2 and Postgres

2001-07-11 Thread Colin Paul Adams

I find all I have to do is edit database.properties (and avoid
spelling mistakes). The jdbc driver needs to be in the classpath, of course.
-- 
Colin Paul Adams
Preston Lancashire

-
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: You cannot get a Poolable before the pool is initialized

2001-07-11 Thread 張文欽

Try to start Database first then start the cocoon
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 11, 2001 10:22 PM
Subject: You cannot get a Poolable before the pool is initialized


> I am trying run an sql statement in an XML.  I have added my driver class
> into my web.xml, added a new datasource to my config, and added a new
match
> pattern in the sitemap to process the request.  I still get the following
> error:
>
>
>  You cannot get a Poolable before the
>  pool is initialized
>
>
>
>
>
>
> What am I missing? How do I initialize my pool?
>
> Any help will be greatly appreciated,
> Joy
>
>
> -
> 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]>




velocity and cocoon

2001-07-11 Thread Rick Anderson

Hi All,

I've been using cocoon for a while, but it seems that Velocity is getting
a big push. Velocity uses VTL instead of XSL. I'd rather use xsl. Has
anyone used Cocoon and velocity together? Are these products incompatible?

Would it be easier to work with XSP instead of velocity?

--Rick Anderson

__
Rick Anderson   | [EMAIL PROTECTED]
|_
Rutgers University, Continuous Education & Outreach
Manager Computer Systems,  (732)932-5071
__


-
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: C1 to C2

2001-07-11 Thread Luca Morandini

Andre,

have you modifed the general sitemap to tell Cocoon you're not under the
cocoon  context ?

For instance, when I wanted a sub-sitemap of mine to be relocated to the
c:\cru directory, I modified the general sitemap as follows:







I hope this helps...
 
-
   Luca Morandini
   GIS Consultant
    [EMAIL PROTECTED]
  +39 0744 59  85  1 Office
  +39 0335 681 02 12 Mobile
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Andre Juffer [mailto:[EMAIL PROTECTED]]
> Sent: mercoledì 11 luglio 2001 21.19
> To: [EMAIL PROTECTED]
> Subject: C1 to C2
>
>
> Hi,
>
> just recently I have posted a question about having cocoon2 recognizing
> my own context under tomcat/webapp. This may be a tomcat problem, still
> I had cocoon1.8.2, together with the apache web server and tomcat,
> working just fine with my own context. Obviously, I would like to be
> able to do the same with cocoon2, but I could not get it going.
>
> I have removed everything that had something to do with cocoon1 and got
> cocoon2 installed. No problem, I could read cocoon/welcome and try some
> of the examples. I did not make any modifications in the existing
> configuration files. So, I continued and made a very simple sitemap in
> webapps/cocoon that simply transforms foo.xml into some html. Worked
> without problem in webapps/cocoon, but, after transferring the relevant
> files to webapps/Foo and restarting tomcat and apache, I got error
> messages. If I request localhost/Foo, the content of my context is
> displayed, but it fails to start the pipeline associated with the
> transformation (localhost/Foo/foo). I get the following error:
>
> 
> type resource-not-found
>
> message Resource not found
>
> description The requested URI "/Foo/foo" was not found.
>
> sender org.apache.cocoon.servlet.CocoonServlet
>
> source Cocoon servlet
>
> request-uri
>
> /Foo/foo
>
> path-info
>
> foo
>
> 
>
> foo is the pattern that should start the pipeline. This works perfectly
> all right when carried out in the cocoon context
> (http://localhost/cocoon/foo). So, it must be a context setup problem.
>
> It seems that tomcat properly sees my context:
>
> 
>
> 2001-07-11 07:50:34 - ContextManager: Adding context Ctx( /Foo )
>
> 
>
> Is there anything special that I may need to do so that
> tomcat/apache/cocoon2 work nicely together?
>
> This is the content of a configuation file that is included into the
> apache httpd.conf file (the same I have used before with cocoon1):
>
> 
>
> LoadModule jserv_module libexec/mod_jserv.so
> ApJServManual on
> ApJServDefaultProtocol ajpv12
> ApJServSecretKey DISABLED
> ApJServMountCopy on
> ApJServLogLevel notice
>
> ApJServDefaultHost localhost
> ApJServDefaultPort 8007
>
> AddType test/jsp .jsp
> AddHandler jserv-servlet .jsp
> AddType text/xml .xml
> AddHandler jserv-servlet .xml
>
> Alias /cocoon /usr/local/jakarta-tomcat-3.2.1/webapps/cocoon
> 
>  Options Indexes FollowSymLinks
> 
> ApJServMount /cocoon /cocoon
> 
>  AllowOverride None
>  deny from all
> 
>
> Alias /Foo /usr/local/jakarta-tomcat-3.2.1/webapps/Foo
> 
>  Options Indexes FollowSymLinks
> 
> ApJServMount /Foo /Foo
> 
>  AllowOverride None
>  deny from all
> 
>
> 
>
>
> Thank you for any suggestion you may have to resolve this matter,
>
> --
> Andre H. Juffer  | Phone: +358-8-553 1683
> The Biocenter and| Fax: +358-8-553-1141
>  the Dep. of Biochemistry | Email: [EMAIL PROTECTED]
> University of Oulu, Finland  | WWW:
> http://www.biochem.oulu.fi/tutkimus/Biocomputing/
>
>
> -
> 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]>




Re: AW: [C2] Redirects

2001-07-11 Thread Uli Mayring

On Wed, 11 Jul 2001, Berin Loritsch wrote:

> > If I understand this correctly, the Avalon Configuration object is kind
> > of a simplified XML structure without deeper nesting, right?
> 
> It can fully represent an XML structure, but it ignores namespaces and you
> cannot traverse UP the hierarchy--only down.  This is by design, so that
> Components that create Components can pass a reference to a child Configuration
> and the child Component cannot get information about the parent Component.
> It's the Inversion of Control principle.

Ok, off-topic, rant warning:

I may sound a bit naive, but I think design patterns and OOP are largely
buzzwords. In the real world nobody can understand this code, but its
creator. There is too much information in the structure and too little in
the actual code, not to speak of the documentation, which is usually
skipped. Some people go to great lengths to define interfaces and abstract
classes to make re-use as easy as possible and then they rarely ever
re-use any code. Hey, all the interfaces and abstract classes in Cocoon1
are for the trashcan now - the time thinking about them should have been
spent writing documentation.

Sorry for the rant, but I currently have to fix a behemoth of abstraction,
where the actual code has become so small, that it's hard to find and hard
to test - with the result being that it hasn't been tested and is full of
obscure bugs. And then the whole thing runs under Avalon, which is 
extremely hard to debug itself :)

Still, maybe I should think less about Cocoon2 and more about Avalon.
Yeah, sometimes I have crazy ideas :)

Please don't take my criticism the wrong way, I'm here because the Apache
group consistently turns out fantastic code. I just have my opinions and
if you read this list, you'll notice that I'm usually quite alone with
them :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Softwareentwicklung


-
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: AW: [C2] Redirects

2001-07-11 Thread Uli Mayring

On Wed, 11 Jul 2001, Berin Loritsch wrote:

> I think you may already be used to not
> getting the output stream in Cocoon 1.

In Cocoon1 it is actually possible to get the OutputStream, I'm using that
in my soap taglib. My auth taglib makes heavy use of redirects (such as
redirecting you to the login page, if you try to access a protected page
and have not authenticated). So these two taglibs, which I use a lot in my
Cocoon1 apps, are not portable to Cocoon2.

Back when XSP taglibs first appeared, it was said that their advantage is
that implementations can change, the interface remains the same. Of course
now that XSP itself works differently, this advantage is gone.

It's always a trade-off between backwards compatibility and new features.
I'm sorry to hear that the XSP model was not deemed fit to last across
different versions of Cocoon - I wonder if it will change again for
Cocoon3. Perhaps the answer lies elsewhere: implement XSP as an Avalon
block, add some parts of Tomcat, Xerces and Xalan as blocks and I won't
need Cocoon anymore to build web applications. That's the beauty of 
OpenSource, that these things are possible.

> The objects you seek are all in the Map objectModel passed in to your pages.
> for XSP, the Request, Context, and Response objects are stored as class
> variables.  Through them, you can get your Session and Cookie objects as usual.
> other than sendRedirect and getting a reference to the output stream, nothing
> should be hidden from you.

Ok, thanks for the info,

Ulrich

-- 
Ulrich Mayring
DENIC eG, Softwareentwicklung


-
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]>




Selectors and Matchers vs components in sitemaps

2001-07-11 Thread HALLOWELL,KARL (HP-Cupertino,ex1)

I noticed that the packages org.apache.cocoon.selection and
org.apache.cocoon.matching contain a number of "code factories" (writes a
StringBuffer of java code) while none of the other packages (in cocoon) do.
Does this mean that if I write a selector or matcher that I actually should
write a CodeFactory object? Didn't spot anything about this subject on the
mailing lists. Thank you.



Karl Hallowell [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]>




C2 and Postgres

2001-07-11 Thread Eric ...
Can you tell me how to configure the database driver in Cocoon2 in order to connect to my postgres database named "dtw". The following first XSP code is working perfectly well under Cocoon1 :
 



  xmlns:xsp="http://www.apache.org/1999/XSP/Core"  xmlns:esql="http://apache.org/cocoon/SQL/v2">



 org.postgresql.Driver jdbc:postgresql://localhost:5432/dtw postgres 
        SELECT url_name,urlextension_name,url_path,imagepath_relativepath,imagepath_filename,fileextension_name FROM url,urlextension,imagepath,fileextension WHERE (url.url_id = '1' AND urlextension_name='com')  ;                              
  

c:\plan.gif


 
The following code failed under Cocoon2 :
 

 
  xmlns:xsp="http://apache.org/xsp"  xmlns:esql="http://apache.org/cocoon/SQL/v2">


 org.postgresql.Driver jdbc:postgresql://localhost:5432/dtw postgres 
        SELECT enduser_id, enduser_lastname, enduser_firstname FROM enduser;             
  



 
Could you please tell me what's wrong, and what files do i need to change (cocoon.xconf ...).
Thanks.
 
Eric VernichonGet Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

-
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]>



[C2] Why different Pipelines

2001-07-11 Thread Stefan Seifert

Hello.

I've one question concerning pipelines in C2: What is the difference in
using one large pipeline to splitting it up in several smaller
pipelines? I cannot see a differene from the documentation? Any
performance/feature differences?

Is it possible to use parts of one pipeline in another pipeline (i.e.
with the aggregator)?

Stefan

-
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: [C1] Generating a HTML frameset using XML/XSLT

2001-07-11 Thread Paul Sprague



Hey,
    I can't seem to tell if my last 
posted got to the mailing list. So sorry if this is redundant.
    
The problem is that the noresize key word is not in 
the form of a name="value" pair.
 

should be this, in both places where noresize is 
used.
 

    



  - Original Message - 
  From: 
  Adrian 
  Geissel 
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, July 11, 2001 11:36 
  AM
  Subject: [C1] Generating a HTML frameset 
  using XML/XSLT
  
  Hi,
   
  We are just trying to put a dynamic frameset as 
  the primary entry-point for our application, and using all that we've learnt 
  so far, we created an XSP file with an associated stylesheet (included at the 
  end of this mail). We get an unusual SAX exception when accessing the 
  frameset:
   
  org.apache.cocoon.processor.ProcessorException: 
  Could not associate stylesheet to document:  error reading 
  C:\tomcat\webapps\zdam\index2html.xsl: org.xml.sax.SAXParseException: 
  Attribute name "FRAME" must be followed by the '=' character.
   
  Has someone come across this before or 
  successfully implemented framesets? 
  All help is gladly accepted.
  Thanks,Adrian
   
  Cocoon 1.8.2
  Tomcat 2.3
  Windows NT
   
  =
  XSP simply generates the following:
   
  
   
  =
    
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"  
  xmlns:mystuff="mystuff.com" >
   
   
   
        
    
      
   
          
            
        
  
   
  
   
   


C1 to C2

2001-07-11 Thread Andre Juffer

Hi,

just recently I have posted a question about having cocoon2 recognizing 
my own context under tomcat/webapp. This may be a tomcat problem, still 
I had cocoon1.8.2, together with the apache web server and tomcat, 
working just fine with my own context. Obviously, I would like to be 
able to do the same with cocoon2, but I could not get it going.

I have removed everything that had something to do with cocoon1 and got 
cocoon2 installed. No problem, I could read cocoon/welcome and try some 
of the examples. I did not make any modifications in the existing 
configuration files. So, I continued and made a very simple sitemap in 
webapps/cocoon that simply transforms foo.xml into some html. Worked 
without problem in webapps/cocoon, but, after transferring the relevant 
files to webapps/Foo and restarting tomcat and apache, I got error 
messages. If I request localhost/Foo, the content of my context is 
displayed, but it fails to start the pipeline associated with the 
transformation (localhost/Foo/foo). I get the following error:


type resource-not-found

message Resource not found

description The requested URI "/Foo/foo" was not found.

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

request-uri

/Foo/foo

path-info

foo



foo is the pattern that should start the pipeline. This works perfectly 
all right when carried out in the cocoon context 
(http://localhost/cocoon/foo). So, it must be a context setup problem.

It seems that tomcat properly sees my context:



2001-07-11 07:50:34 - ContextManager: Adding context Ctx( /Foo )



Is there anything special that I may need to do so that 
tomcat/apache/cocoon2 work nicely together?

This is the content of a configuation file that is included into the 
apache httpd.conf file (the same I have used before with cocoon1):



LoadModule jserv_module libexec/mod_jserv.so
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy on
ApJServLogLevel notice

ApJServDefaultHost localhost
ApJServDefaultPort 8007

AddType test/jsp .jsp
AddHandler jserv-servlet .jsp
AddType text/xml .xml
AddHandler jserv-servlet .xml

Alias /cocoon /usr/local/jakarta-tomcat-3.2.1/webapps/cocoon

 Options Indexes FollowSymLinks

ApJServMount /cocoon /cocoon

 AllowOverride None
 deny from all


Alias /Foo /usr/local/jakarta-tomcat-3.2.1/webapps/Foo

 Options Indexes FollowSymLinks

ApJServMount /Foo /Foo

 AllowOverride None
 deny from all





Thank you for any suggestion you may have to resolve this matter,

-- 
Andre H. Juffer  | Phone: +358-8-553 1683
The Biocenter and| Fax: +358-8-553-1141
 the Dep. of Biochemistry | Email: [EMAIL PROTECTED]
University of Oulu, Finland  | WWW: 
http://www.biochem.oulu.fi/tutkimus/Biocomputing/


-
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: [C1] Generating a HTML frameset using XML/XSLT

2001-07-11 Thread Kevin D'Allaird

Adrian,
You must use valid XML... try noresize="yes"

> scrolling="no" frameborder="0" noresize/>


-Original Message-
From: Adrian Geissel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 11:37 AM
To: [EMAIL PROTECTED]
Subject: [C1] Generating a HTML frameset using XML/XSLT


Hi,

We are just trying to put a dynamic frameset as the primary entry-point for
our application, and using all that we've learnt so far, we created an XSP
file with an associated stylesheet (included at the end of this mail). We
get an unusual SAX exception when accessing the frameset:

org.apache.cocoon.processor.ProcessorException: Could not associate
stylesheet to document:  error reading
C:\tomcat\webapps\zdam\index2html.xsl: org.xml.sax.SAXParseException:
Attribute name "FRAME" must be followed by the '=' character.

Has someone come across this before or successfully implemented framesets? 
All help is gladly accepted.
Thanks,
Adrian

Cocoon 1.8.2
Tomcat 2.3
Windows NT

=
XSP simply generates the following:



=

http://www.w3.org/1999/XSL/Transform";
  xmlns:xsp="http://www.apache.org/1999/XSP/Core";
  xmlns:mystuff="mystuff.com"
 >

 

  

  



  
  


  

  




-
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: [C2] using XInclude Transformer

2001-07-11 Thread SUBRAHMANYAM,VEENA (HP-MountainView,ex1)

Is there a sample that uses the XInclude Transformer, that I could get my
hands on?

:-)

Thanx in advance

Veena
-Original Message-
From: Jeremy Quinn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 9:13 AM
To: Cocoon Users
Subject: [C2] using XInclude Transformer


Hi All,

I am struggling to use the XInclude Transformer in Cocoon 2.


My TomCat Context is /hrc2/

I access the URL /hrc2/index.html

In my file I have the following:




This 'href' worked fine in Cocoon 1, but in Cocoon 2 gives me :

org.apache.cocoon.ProcessingException: Failed to execute
pipeline.:java.io.FileNotFoundException: /./linkbase/hrc.xml (No such file
or directory)


the relevant section from my sitemap looks like this:










I have tried every variation on the path that I can think of, what am I
doing wrong?


Thanks for any help

BTW. Which is the best one to use?
XIncludeTransformer
CIncludeTransformer
or
CachingCIncludeTransformer?

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]>

-
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: You cannot get a Poolable before the pool is initialized

2001-07-11 Thread JStalnecker


got it fixed thx anyway


   

Mariano Kamp   

   cc:   

 Subject: Re: You cannot get a Poolable 
before 
07/11/01 the pool is initialized   

11:53 AM   

Please 

respond to 

cocoon-users   

   

   





Joy,

  my two cents as a rookie myself:

  The message says, that there are no connections in the pool you
specified.
Well, that's what the message says already ;-)

  During startup of cocoon the JDBC Connections are created and pooled.
Therefore you'll probably find a error message in the cocoon.log. It
usually
says, ClassNotFound, Wrong URL etc. Did you copy the jar-file of your
driver
to the lib directory?

Mariano

On Wednesday 11 July 2001 04:22 pm, [EMAIL PROTECTED] wrote:
> I am trying run an sql statement in an XML.  I have added my driver class
> into my web.xml, added a new datasource to my config, and added a new
match
> pattern in the sitemap to process the request.  I still get the following
> error:
>
>
>  You cannot get a Poolable before the
>  pool is initialized
>
>
>
>
>
>
> What am I missing? How do I initialize my pool?
>
> Any help will be greatly appreciated,
> Joy
>
>
> -
> 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]>






-
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: [C2] using XInclude Transformer

2001-07-11 Thread Berin Loritsch

Jeremy Quinn wrote:
> 
> Hi All,
> 
> I am struggling to use the XInclude Transformer in Cocoon 2.

There are two issues with it (I just got done fixing it).

1) You need to include an xml:base="context://"  This tells the
   Xinclude processor where the root is.  P.S.  The newly checked
   in version will update the namespace to "http://www.w3.org/2001/XInclude";.

2) There is an error in the construct: new URL(baseURL, relative);  This
   seems to be an error in Sun's JVM.  The URLFactory component has also
   been updated to fix this problem when we have the "file" protocol.

Please allow me a few minutes to update CVS, then you can get the working
version there.

> 
> My TomCat Context is /hrc2/
> 
> I access the URL /hrc2/index.html
> 
> In my file I have the following:
> 
> 
> 
> This 'href' worked fine in Cocoon 1, but in Cocoon 2 gives me :
> 
> org.apache.cocoon.ProcessingException: Failed to execute
> pipeline.:java.io.FileNotFoundException: /./linkbase/hrc.xml (No such file
> or directory)
> 
> the relevant section from my sitemap looks like this:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I have tried every variation on the path that I can think of, what am I
> doing wrong?
> 
> Thanks for any help
> 
> BTW. Which is the best one to use?
> XIncludeTransformer
> CIncludeTransformer
> or
> CachingCIncludeTransformer?
> 
> 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]>
 S/MIME Cryptographic Signature


FOP, setting header size based on content

2001-07-11 Thread Darrel Riekhof

The header section on our reports needs to grow or shrink based on it's
content.  What is the best way to do this?

I was thinking about embedding header size info in the xml file.  It
probably makes more sense to put it in the xsl file, but I was thinking all
of our xsl files would be static, and I wouldn't know this info until
runtime.

Anyone have an example to share that dynamically sets the height of their
header?

Darrel

-
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: AW: [C2] Redirects

2001-07-11 Thread Berin Loritsch

Ulrich Mayring wrote:
> 
> Berin Loritsch wrote:
> >
> > That is a problem inherent in JSP, ASP, and ColdFusion.  Each has their own 
>proprietary
> > way of handling logic.  XSP is the first "scripting" language that allows you to
> > use logicsheets defined in other languages--but any time you use the  
>tag,
> > you lose portability accross languages.
> 
> Well, I don't need the  element, I can define my own custom
> taglibs. Then I can give the XML file to someone else and he can
> implement my custom tags using his personal framework. He can implement
> it in PHP, JSP or whatever else he fancies.
> 
> > Also, XSP is only used in AxKit and Cocoon at this time.  You are still fairly 
>limited
> > in your frameworks you can choose.
> 
> Yeah, but how many JSP frameworks are out there? How many PHP
> frameworks? I don't think the situation with XSP is particularly bad
> compared to other projects. The difference is that XSP provides a
> generic XML interface.
> 
> > Lastly, you can set up Actions that respond to an XML document.  Check out the 
>action
> > with the longest name:  AbstractComplimentaryConfigurableAction.  It provides a 
>mechanism
> > for you to specify a run-time Configuration setup (i.e. an XML file you specify as 
>a
> > parameter).  It loads and caches the XML in the form of an Avalon Configuration 
>object.
> 
> If I understand this correctly, the Avalon Configuration object is kind
> of a simplified XML structure without deeper nesting, right?

It can fully represent an XML structure, but it ignores namespaces and you
cannot traverse UP the hierarchy--only down.  This is by design, so that
Components that create Components can pass a reference to a child Configuration
and the child Component cannot get information about the parent Component.
It's the Inversion of Control principle.

The XML can be however deep you need it--and have attributes as well.

> > Your action can now do very dynamic things and the XML representation of the logic
> > is in a portable XML file.
> 
> This sounds interesting. If it works and is easy to use, it's
> undoubtedly better than XSP redirects. I'll try it when I have a few
> weeks :)

Sounds good ;)
 S/MIME Cryptographic Signature


To Eric Vernichon or Benjamin Pignier, other: please ignore

2001-07-11 Thread Mariano Kamp

Hi there,

  sorry for disturbing the list with "private" mail, but I got an email 
regarding the list with an invalid sender address. I'm posting it here to get 
it back to the original sender.

Sorry,
Mariano


Eric,

  if you read this mail ?!?! , please clean up your email account.  I got 
this message, when replying to you:

- The following addresses had permanent fatal errors -
<[EMAIL PROTECTED]>
(reason: 554 delivery error: dd Sorry, your message to 
[EMAIL PROTECTED] cannot be delivered.  This account is over quota. - 
mta588.mail.yahoo.com)

   - Transcript of session follows -
... while talking to mx1.mail.yahoo.com.:
>>> DATA

<<< 554 delivery error: dd Sorry, your message to [EMAIL PROTECTED] cannot 
be delivered.  This account is over quota. - mta588.mail.yahoo.com
554 5.0.0 <[EMAIL PROTECTED]>... Service unavailable


Mariano
--  Forwarded Message  --
Subject: Re:
Date: Wed, 11 Jul 2001 19:13:47 +0200
From: Mariano Kamp <[EMAIL PROTECTED]>
To: benjamin pignier <[EMAIL PROTECTED]>


Bonjour Benjamin or Eric?

  I managed to get esql working, but I am not an expert on this. It would
make a lot of sense if you post your message on the users list again. There
is a much wider audience.

  What you should do is, giving more informations. Nobody will be able to
help you with the information you just gave me.

  Please look at the logfile /WEB-INF/logs/cocoon.log and post
thee messages on the list.

  Hope this helps.
Au revoir,
Mariano

On Wednesday 11 July 2001 06:11 pm, benjamin pignier wrote:
> I've just read a reply you made in the discussion list
> "[EMAIL PROTECTED]".
> I wonder if you could help me.
> I'm not able to configure Cocoon2 in order to connect
> to my database (postgres) using  syntaxe.
> Or it might be a problem with my configuration of
> pooling connection because i don't know how to
> configure it in cocoon.conf.
> My configuration is redhat 7.0/tomcat3.21/cocoon2.0b1.
>
> Sincerely.
>
> Eric Vernichon
>
> ___
> Do You Yahoo!? -- Pour faire vos courses sur le Net,
> Yahoo! Shopping : http://fr.shopping.yahoo.com

---

-
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: AW: [C2] Redirects

2001-07-11 Thread Berin Loritsch

Ulrich Mayring wrote:
> 
> Christopher Painter-Wakefield wrote:
> >
> > I think the point is also well taken that, hey, redirects
> > are a part of the current state of the art
> > in web programming.
> 
> Not only that, redirects are part of the HTTP standard. So they should
> be the first thing that is supported by a web app framework and better
> mechanisms could be introduced additionally. But I think where there's a
> standard, it should be possible to use it. I mean, it *is* possible to
> use redirects in the Sitemap and in Actions, but unfortunately not in
> XSP.

Redirects are not possible largely due to the SAX pipeline.  Read my other
mails for details.

> This leads me to the question: what else is not possible in XSP? If the
> request object were fully exposed like in Cocoon1, then redirects would
> work. So is the request object not accessible anymore in Cocoon2's XSP?
> What about the session and response object?

The Request and Session objects are wrapped with Cocoon objects--so that
we can have the same application work wether in a Servlet environment, a
Command Line environment, or an Avalon environment.  The abstraction allows
you to handle a number of situations.  The abstraction is based on the
HttpServlet spec.  You can get to the Request, Response, and Session objects
as usual.  You may not sendRedirect() from the version you get, or obtain
a reference to the output stream.  I think you may already be used to not
getting the output stream in Cocoon 1.  The output stream is explicitly
set in Serializers and Readers.

The objects you seek are all in the Map objectModel passed in to your pages.
for XSP, the Request, Context, and Response objects are stored as class
variables.  Through them, you can get your Session and Cookie objects as usual.
other than sendRedirect and getting a reference to the output stream, nothing
should be hidden from you.
 S/MIME Cryptographic Signature


Re: [C1] Generating a HTML frameset using XML/XSLT

2001-07-11 Thread Paul Sprague



  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
xmlns:xsp="http://www.apache.org/1999/XSP/Core"  
xmlns:mystuff="mystuff.com" >     
  
    
   {@frame-top}" marginwidth="10" marginheight="10" 
scrolling="no" frameborder="0">    
  
      {@frame-sidebar}" 
marginwidth="0" marginheight="0" scrolling="no" 
frameborder="0">  
    
    {@frame-main}" 
marginwidth="0" marginheight="0" scrolling="auto" 
frameborder="0"/>  
      
 

  - Original Message - 
  From: 
  Adrian 
  Geissel 
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, July 11, 2001 11:36 
  AM
  Subject: [C1] Generating a HTML frameset 
  using XML/XSLT
  
  Hi,
   
  We are just trying to put a dynamic frameset as 
  the primary entry-point for our application, and using all that we've learnt 
  so far, we created an XSP file with an associated stylesheet (included at the 
  end of this mail). We get an unusual SAX exception when accessing the 
  frameset:
   
  org.apache.cocoon.processor.ProcessorException: 
  Could not associate stylesheet to document:  error reading 
  C:\tomcat\webapps\zdam\index2html.xsl: org.xml.sax.SAXParseException: 
  Attribute name "FRAME" must be followed by the '=' character.
   
  Has someone come across this before or 
  successfully implemented framesets? 
  All help is gladly accepted.
  Thanks,Adrian
   
  Cocoon 1.8.2
  Tomcat 2.3
  Windows NT
   
  =
  XSP simply generates the following:
   
  
   
  =
    
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"  
  xmlns:mystuff="mystuff.com" >
   
   
   
        
    
      
   
          
            
        
  
   
  
   
   


Re: [C1] Generating a HTML frameset using XML/XSLT

2001-07-11 Thread Benoît Chauvet

I think the error message is clear enough...
The SAX parser waits for an "=" character after the attribute "FRAME"...

Maybe it doesn't allow the '-' character you use...

Try  instead...

--
Benoît Chauvet


-
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: AW: [C2] Redirects

2001-07-11 Thread C. Gaffga

What's the Problem about flow. It's also very simple with coocon.
Because a page that redirect doesn't output anything, why
you dont't use a simple JSP page. from there you can redirect
to an XML/XSP page with output.

Christoph Gaffga


- Original Message -
From: "Ulrich Mayring" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 11, 2001 3:37 PM
Subject: Re: AW: [C2] Redirects


> Berin Loritsch wrote:
> >
> > Oh, you aren't being fair.  Just because it is too easy to do in
> > scripting frameworks, doesn't mean we should allow the same abuse
> > of redirects in Cocoon.  You just have to think harder.
>
> Well, it's a design decision. I expect from a web publishing framework
> that it allows me to build web applications. And redirects are IMHO a
> big part of it, they provide program flow. I don't see how a framework
> could suffer, if it offers redirects - nobody is forced to use the
> redirects, but it should be possible. If you know of another way to do
> program flow, please tell me. But web apps are based on HTTP requests
> and thus, if I want to do a new thing, I have to make a new HTTP
> request.
>
> > Regarding logic in the sitemap, I whole-heartedly agree.  Business logic
> > does not belong in the sitemap.  Period.  If you do that, your business
> > logic is at the mercy of the sitemap administrator.
>
> Program flow is a large part of business logic :)
>
> > Regarding the proprietary format: there was no standard for this type of
> > thing.  If you show us a standard on URI space management that keeps the
> > filesystem and the URI space orthagonal, we will definitely look at
integrating
> > it.  Unfortunately, this is something that is up to whatever framework
> > you use.
>
> Cocoon1 provides a simple way to code program flow into the XML pages
> themselves. This is not proprietary if done with logicsheets, because
> the XML files themselves are just an interface, that could be
> implemented differently if moving outside the Cocoon world. URI space
> management should not get in the way of program flow, these are IMHO two
> different issues.
>
> > Also regarding the proprietary format:  Cocoon can be used accross many
> > servlet engines.  This reduces the risk of using Cocoon.  If you decide
> > to switch frameworks, well you have the overhead of removing one
> > infrastructure and implementing a new one.  I don't care how "standard"
> > something is--there is always some point of a little rework that needs
> > to be done.
>
> It's not up to me what framework our business partners use. But I have
> to able to communicate with them - the Sitemap is an inappropriate
> format for this communication. It's too low-level, we need to think in
> concepts :-)
>
> > I believe redirects as a result of business logic belong in Actions.
That
> > logic can be a result of a parameter or whatever--but I don't think the
sitemap
> > is the place for it.  But given your previous arguments that you would
argue
> > that Actions are also proprietary.
>
> Not if they provide a neutral interface like XSP taglibs do. Hey, Avalon
> is full of interfaces :)
>
> > Does the solution I provided above work for you?  By tying your logic to
session
> > beans, you have a portable infrastructure that minimizes dependance on
some aspects
> > of Cocoon.
>
> I like XSP taglibs, because XML is more a standard than Beans. I can't
> give Beans to folks not using Java, but I can give them XML.
>
> Ulrich
>
> --
> Ulrich Mayring
> DENIC eG, Systementwicklung
>
> -
> 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]>




[C2] using XInclude Transformer

2001-07-11 Thread Jeremy Quinn

Hi All,

I am struggling to use the XInclude Transformer in Cocoon 2.


My TomCat Context is /hrc2/

I access the URL /hrc2/index.html

In my file I have the following:




This 'href' worked fine in Cocoon 1, but in Cocoon 2 gives me :

org.apache.cocoon.ProcessingException: Failed to execute
pipeline.:java.io.FileNotFoundException: /./linkbase/hrc.xml (No such file
or directory)


the relevant section from my sitemap looks like this:










I have tried every variation on the path that I can think of, what am I
doing wrong?


Thanks for any help

BTW. Which is the best one to use?
XIncludeTransformer
CIncludeTransformer
or
CachingCIncludeTransformer?

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]>




[C2] using XInclude Transformer

2001-07-11 Thread Jeremy Quinn

Hi All,

I am struggling to use the XInclude Transformer in Cocoon 2.


My TomCat Context is /hrc2/

I access the URL /hrc2/index.html

In my file I have the following:




This 'href' worked fine in Cocoon 1, but in Cocoon 2 gives me :

org.apache.cocoon.ProcessingException: Failed to execute
pipeline.:java.io.FileNotFoundException: /./linkbase/hrc.xml (No such file
or directory)


the relevant section from my sitemap looks like this:










I have tried every variation on the path that I can think of, what am I
doing wrong?


Thanks for any help

BTW. Which is the best one to use?
XIncludeTransformer
CIncludeTransformer
or
CachingCIncludeTransformer?

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]>




Re: AW: [C2] Redirects

2001-07-11 Thread Ulrich Mayring

Berin Loritsch wrote:
> 
> That is a problem inherent in JSP, ASP, and ColdFusion.  Each has their own 
>proprietary
> way of handling logic.  XSP is the first "scripting" language that allows you to
> use logicsheets defined in other languages--but any time you use the  
>tag,
> you lose portability accross languages.

Well, I don't need the  element, I can define my own custom
taglibs. Then I can give the XML file to someone else and he can
implement my custom tags using his personal framework. He can implement
it in PHP, JSP or whatever else he fancies.

> Also, XSP is only used in AxKit and Cocoon at this time.  You are still fairly 
>limited
> in your frameworks you can choose.

Yeah, but how many JSP frameworks are out there? How many PHP
frameworks? I don't think the situation with XSP is particularly bad
compared to other projects. The difference is that XSP provides a
generic XML interface.

> Lastly, you can set up Actions that respond to an XML document.  Check out the action
> with the longest name:  AbstractComplimentaryConfigurableAction.  It provides a 
>mechanism
> for you to specify a run-time Configuration setup (i.e. an XML file you specify as a
> parameter).  It loads and caches the XML in the form of an Avalon Configuration 
>object.

If I understand this correctly, the Avalon Configuration object is kind
of a simplified XML structure without deeper nesting, right?

> Your action can now do very dynamic things and the XML representation of the logic
> is in a portable XML file.

This sounds interesting. If it works and is easy to use, it's
undoubtedly better than XSP redirects. I'll try it when I have a few
weeks :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

-
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: AW: [C2] Redirects

2001-07-11 Thread Ulrich Mayring

Christopher Painter-Wakefield wrote:
> 
> I think the point is also well taken that, hey, redirects 
> are a part of the current state of the art
> in web programming.

Not only that, redirects are part of the HTTP standard. So they should
be the first thing that is supported by a web app framework and better
mechanisms could be introduced additionally. But I think where there's a
standard, it should be possible to use it. I mean, it *is* possible to
use redirects in the Sitemap and in Actions, but unfortunately not in
XSP. 

This leads me to the question: what else is not possible in XSP? If the
request object were fully exposed like in Cocoon1, then redirects would
work. So is the request object not accessible anymore in Cocoon2's XSP?
What about the session and response object?

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

-
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]>




[C1] Generating a HTML frameset using XML/XSLT

2001-07-11 Thread Adrian Geissel



Hi,
 
We are just trying to put a dynamic frameset as the 
primary entry-point for our application, and using all that we've learnt so far, 
we created an XSP file with an associated stylesheet (included at the end of 
this mail). We get an unusual SAX exception when accessing the 
frameset:
 
org.apache.cocoon.processor.ProcessorException: 
Could not associate stylesheet to document:  error reading 
C:\tomcat\webapps\zdam\index2html.xsl: org.xml.sax.SAXParseException: Attribute 
name "FRAME" must be followed by the '=' character.
 
Has someone come across this before or successfully 
implemented framesets? 
All help is gladly accepted.
Thanks,Adrian
 
Cocoon 1.8.2
Tomcat 2.3
Windows NT
 
=
XSP simply generates the following:
 

 
=
  
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
xmlns:xsp="http://www.apache.org/1999/XSP/Core"  
xmlns:mystuff="mystuff.com" >
 
 
 
      
  
    
 
        
          
      

 

 
 


Re: AW: [C2] Redirects

2001-07-11 Thread Ulrich Mayring

Berin Loritsch wrote:
> 
> No, I'm saying, "don't use redirects when another tool will work better".
> I'm challenging the concept that you _have_ to use redirects to control
> program flow.

Ok, you're saying I should select my logic from inside Beans. I don't
use Beans for various reasons and think I shouldn't be forced to just to
do program flow. Redirects are part of HTTP, they were invented to be
used as a standard way to do program flow. I prefer this to proprietary
methods, but of course others may think differently.

> > I'm not necessarily a big fan of redirects, but there is no other way
> > currently to control web program flow and now Cocoon2 is taking that
> > away as well :)
> 
> That is a common misconception.  Program flow is dependant on selecting
> the propper web resource.

I think it's better to select Web resources via HTTP, not via Beans or
other non-Web techniques.

> If you have one URI for a whole form flow, you
> can use an action to return the name of the resource you want to select.

Yes, but I don't want to have one URI for my whole application. I want
to break it down into re-usable parts, in Web apps I like modular
designs better than monolithic ones.

> That means that at the same URI you will have a number resources.  Many
> times for web applications (at least the ones I write) you have one entry
> point, and you are forcing a flow on the user.  These are prime examples
> of what I was talking about.  Here is a possible sitemap entry:

Unfortunately, a look at my Visio charts tells me that I have many entry
points and a lot of sharing between workflows.

> Most scripting languages (like JSP, ASP, ColdFusion) have made us think that
> redirects are the only way of handling program flow.  That is because that is
> the only mechanism they gave you.  Cocoon challenges that assumption just as
> it challenges the assumption that your URI space has to match the filesystem.

Well, at least Cocoon allows me to match URI space with the filesystem,
while it doesn't allow me to handle program flow via redirects. At least
not without a major redesign of my application. It's hard for me to
argue your points, because I can't really just sit down and try it out -
I'd have to completely redesign my applications just to verify your
ideas. Unfortunately I don't have the time to do that currently, so I
can only argue from a theoretical point.

Maybe Cocoon2 can do what I need after all, but it'll have to wait until
I find more time. By the time that happens we'll have a complete
Avalon-based infrastructure here running all our internal processes with
the exception of the Cocoon1 apps and the SOAP services. That would
probably be a good time to re-visit Cocoon2, perhaps it can even be
installed as a .sar application by then :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

-
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: AW: [C2] Redirects

2001-07-11 Thread Berin Loritsch

Anders Lindh wrote:
> 
> >One of the issues is technical in nature.  Because of the SAX stream
> approach
> >that Cocoon 2 uses, the XSP page is being serialized AS it is being parsed.
> >What is happening is that each SAX event (startDocument, startElement,
> etc),
> >is being propogated through the entire SAX chain and being transformed as
> they
> >are called.  Once the root element has been propogated, there is no turning
> >back.
> 
> Ok.. Could you clarify a bit how and in what order things are done in
> Cocoon. What
> exactly does Cocoon do with a xsp page (that has been compiled into a java
> class)? The
> compiled java class constructs a SAX document, which in turn is XSLT
> processed if needed. Right?
> Isn't this the basic flow of things?


Yes.  The key difference between DOM based Cocoon 1 and SAX based Cocoon 2
is the way information travels from generator to transformer to serializer
(or equivalent in Cocon 10.  In Cocoon 1, the DOM is created and manipulated
before being passed to the next step (i.e. redirects are possible because
nothing has passed from the "pipeline" to the serializer yet.  In fact, in
Cocoon 1 you can perform redirects at any stage before the final serialization.
There is nothing technical keeping you from it.  It is also why it tends to
be much slower than Cocoon 2.

SAX based Cocoon 2 fires events which are propogated through the pipeline
as the document is processed.  This means that the event is fired first
in the Generator (your XSP), and then in each successive Transformer, and
finally in the Serializer.

XSP flow does not start until you have your document's root element.  That
means that any  sections that are outside of the root element
become class variables or methods.  It also means that the root startElement()
event is fired before any code is executed.  In a generator, the only safe
place to do a redirect is in the setup() method.  XSP does not give you access
to that (unless you took advantage of your knowledge of how the generated
class behaves).  It is never safe to perform a redirect in a Transformer
with Cocoon 2.
 S/MIME Cryptographic Signature


Re: AW: [C2] Redirects

2001-07-11 Thread Christian Haul

On 11.Jul.2001 -- 05:06 PM, Anders Lindh wrote:
> >One of the issues is technical in nature.  Because of the SAX stream
> approach
> >that Cocoon 2 uses, the XSP page is being serialized AS it is being parsed.
> >What is happening is that each SAX event (startDocument, startElement,
> etc),
> >is being propogated through the entire SAX chain and being transformed as
> they
> >are called.  Once the root element has been propogated, there is no turning
> >back.
> 
> Ok.. Could you clarify a bit how and in what order things are done in
> Cocoon. What
> exactly does Cocoon do with a xsp page (that has been compiled into a java
> class)? The
> compiled java class constructs a SAX document, which in turn is XSLT
> processed if needed. Right?
> Isn't this the basic flow of things?

Only that there's no SAX "document". While the XSP still generates SAX
events (document nodes), others are transformed and some are already
serialized and send to the client. Everything happens
concurrently. Thus when 50% (1%, 99%) of the document have already
reached the client what semantics should a redirect have?

C2 had a "send-redirect" in the response taglib. And if you were
lucky, the redirect was issued while the servlet engine's send buffer
was only filling up and nothing has been delivered, yet. Most of the
time the redirect never reached the client or two documents were
concatenated (i.e. IE)

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
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]>




You cannot get a Poolable before the pool is initialized

2001-07-11 Thread JStalnecker

I am trying run an sql statement in an XML.  I have added my driver class
into my web.xml, added a new datasource to my config, and added a new match
pattern in the sitemap to process the request.  I still get the following
error:


 You cannot get a Poolable before the   
 pool is initialized






What am I missing? How do I initialize my pool?

Any help will be greatly appreciated,
Joy


-
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: AW: [C2] Redirects

2001-07-11 Thread Berin Loritsch

Ulrich Mayring wrote:
> 
> It's not up to me what framework our business partners use. But I have
> to able to communicate with them - the Sitemap is an inappropriate
> format for this communication. It's too low-level, we need to think in
> concepts :-)

I agree.  I don't think the Sitemap is the propper place for it.

> > I believe redirects as a result of business logic belong in Actions.  That
> > logic can be a result of a parameter or whatever--but I don't think the sitemap
> > is the place for it.  But given your previous arguments that you would argue
> > that Actions are also proprietary.
> 
> Not if they provide a neutral interface like XSP taglibs do. Hey, Avalon
> is full of interfaces :)

The interface they provide is:

interface Action {
Map act(Redirector redirector, SourceResolver resolver, Map objectMap, String 
source, Parameters parm);
}

So a Cocoon Redirector, SourceResolver, and objectMap are passed.  The source is the
value passed in , and the Parameters are the
Avalon Parameters object.  You can see that an Action is somewhat Cocoon centric.
You can provide your own generic interface, and use those in a Controller Action.

> > Does the solution I provided above work for you?  By tying your logic to session
> > beans, you have a portable infrastructure that minimizes dependance on some aspects
> > of Cocoon.
> 
> I like XSP taglibs, because XML is more a standard than Beans. I can't
> give Beans to folks not using Java, but I can give them XML.

That is a problem inherent in JSP, ASP, and ColdFusion.  Each has their own proprietary
way of handling logic.  XSP is the first "scripting" language that allows you to
use logicsheets defined in other languages--but any time you use the  tag,
you lose portability accross languages.

Also, XSP is only used in AxKit and Cocoon at this time.  You are still fairly limited
in your frameworks you can choose.

Lastly, you can set up Actions that respond to an XML document.  Check out the action
with the longest name:  AbstractComplimentaryConfigurableAction.  It provides a 
mechanism
for you to specify a run-time Configuration setup (i.e. an XML file you specify as a
parameter).  It loads and caches the XML in the form of an Avalon Configuration object.
Your action can now do very dynamic things and the XML representation of the logic
is in a portable XML file.
 S/MIME Cryptographic Signature


RE: AW: [C2] Redirects

2001-07-11 Thread Anders Lindh

>One of the issues is technical in nature.  Because of the SAX stream
approach
>that Cocoon 2 uses, the XSP page is being serialized AS it is being parsed.
>What is happening is that each SAX event (startDocument, startElement,
etc),
>is being propogated through the entire SAX chain and being transformed as
they
>are called.  Once the root element has been propogated, there is no turning
>back.

Ok.. Could you clarify a bit how and in what order things are done in
Cocoon. What
exactly does Cocoon do with a xsp page (that has been compiled into a java
class)? The
compiled java class constructs a SAX document, which in turn is XSLT
processed if needed. Right?
Isn't this the basic flow of things?

- Anders


-
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: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread Dongilli Paolo

> > > 2) load this page in your browser. (At this point, the page 
> > > prints 'FOO  Hi,
> > > I'm your ...' in my browser)
> > 
> > OK.
> 
> Do you see 'FOO ...' in your browser ? If not, what is the 
> *complete* path
> to the _clean-page.java file and the *complete* path to your 
> clean-page.xml
> file ? They should look like the same at the end (with '_' for java)

Yes, I see 'FOO ...'.

Paolo.



> 
> > 
> > > 3) take a look in your repository and check the 
> > > '_clean-page.java' to see if
> > > its date of modification is the current time and date. If so 
> > > search in it
> > > for the string 'FOO'. You should find it, if the page is recreated
> > > correctly.
> > 
> > OK. _clean-page.java created and it contains the modicication "FOO".
> > 
> > > And let's see what happens (please copy what you put in 
> > > cocoon.properties
> > > for the repository path)
> > 
> > processor.xsp.repository = /usr/share/java/repository
> > 
> > Waiting for further steps.
> > 
> > Thanks,
> > Paolo.
> 
> -
> 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]>




Re: AW: [C2] Redirects

2001-07-11 Thread Ulrich Mayring

Berin Loritsch wrote:
> 
> Oh, you aren't being fair.  Just because it is too easy to do in
> scripting frameworks, doesn't mean we should allow the same abuse
> of redirects in Cocoon.  You just have to think harder.

Well, it's a design decision. I expect from a web publishing framework
that it allows me to build web applications. And redirects are IMHO a
big part of it, they provide program flow. I don't see how a framework
could suffer, if it offers redirects - nobody is forced to use the
redirects, but it should be possible. If you know of another way to do
program flow, please tell me. But web apps are based on HTTP requests
and thus, if I want to do a new thing, I have to make a new HTTP
request.

> Regarding logic in the sitemap, I whole-heartedly agree.  Business logic
> does not belong in the sitemap.  Period.  If you do that, your business
> logic is at the mercy of the sitemap administrator.

Program flow is a large part of business logic :)

> Regarding the proprietary format: there was no standard for this type of
> thing.  If you show us a standard on URI space management that keeps the
> filesystem and the URI space orthagonal, we will definitely look at integrating
> it.  Unfortunately, this is something that is up to whatever framework
> you use.

Cocoon1 provides a simple way to code program flow into the XML pages
themselves. This is not proprietary if done with logicsheets, because
the XML files themselves are just an interface, that could be
implemented differently if moving outside the Cocoon world. URI space
management should not get in the way of program flow, these are IMHO two
different issues.

> Also regarding the proprietary format:  Cocoon can be used accross many
> servlet engines.  This reduces the risk of using Cocoon.  If you decide
> to switch frameworks, well you have the overhead of removing one
> infrastructure and implementing a new one.  I don't care how "standard"
> something is--there is always some point of a little rework that needs
> to be done.

It's not up to me what framework our business partners use. But I have
to able to communicate with them - the Sitemap is an inappropriate
format for this communication. It's too low-level, we need to think in
concepts :-)

> I believe redirects as a result of business logic belong in Actions.  That
> logic can be a result of a parameter or whatever--but I don't think the sitemap
> is the place for it.  But given your previous arguments that you would argue
> that Actions are also proprietary.

Not if they provide a neutral interface like XSP taglibs do. Hey, Avalon
is full of interfaces :)

> Does the solution I provided above work for you?  By tying your logic to session
> beans, you have a portable infrastructure that minimizes dependance on some aspects
> of Cocoon.

I like XSP taglibs, because XML is more a standard than Beans. I can't
give Beans to folks not using Java, but I can give them XML.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

-
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: AW: [C2] Redirects

2001-07-11 Thread Christopher Painter-Wakefield


I agree.  It is fine to discourage use of redirects, but dictating it to
everyone by arbitrarily removing it from the framework is, in my opinion, a
poor choice.  Trust us to make mature choices about what constitutes good
design, even while educating us on a better way.  I think the point is also
well taken that, hey, redirects are a part of the current state of the art
in web programming.  Most programming languages have some dangerous
constructs (e.g., #become: in Smalltalk); maybe you avoid it like the
plague, but once in a long while, the benefits outweigh the problem, so you
use it.  So please, give us redirects even if you tell us not to use it.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   <[EMAIL PROTECTED]>
cc:

Subject:  RE: AW: [C2] Redirects


>> Ok, thanks a lot for your info. I now understand it is possible, but
>> extremely complicated and verbose to do redirects in Cocoon2 :-)
>Oh, you aren't being fair.  Just because it is too easy to do in
>scripting frameworks, doesn't mean we should allow the same abuse
>of redirects in Cocoon.  You just have to think harder.

I have to agree on the first point. Migration from C1 to C2 is everything
else than compile & run, just because of this one thing. I agree that
using actions in the sitemap is a more clean solution, and yes, I agree
that
program flow shouldn't be dictated in xsp pages. But couldn't this one
little
feature be implemented (with warnings, and some restrictions) just so that
C1 users could play around with C2 and enjoy the new features? I'd really
appreciate
it...

- Anders





-
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: AW: [C2] Redirects

2001-07-11 Thread Berin Loritsch

Anders Lindh wrote:
> 
> >> Ok, thanks a lot for your info. I now understand it is possible, but
> >> extremely complicated and verbose to do redirects in Cocoon2 :-)
> >Oh, you aren't being fair.  Just because it is too easy to do in
> >scripting frameworks, doesn't mean we should allow the same abuse
> >of redirects in Cocoon.  You just have to think harder.
> 
> I have to agree on the first point. Migration from C1 to C2 is everything
> else than compile & run, just because of this one thing. I agree that
> using actions in the sitemap is a more clean solution, and yes, I agree that
> program flow shouldn't be dictated in xsp pages. But couldn't this one
> little
> feature be implemented (with warnings, and some restrictions) just so that
> C1 users could play around with C2 and enjoy the new features? I'd really
> appreciate
> it...


One of the issues is technical in nature.  Because of the SAX stream approach
that Cocoon 2 uses, the XSP page is being serialized AS it is being parsed.
What is happening is that each SAX event (startDocument, startElement, etc),
is being propogated through the entire SAX chain and being transformed as they
are called.  Once the root element has been propogated, there is no turning
back.

This is the blessing and curse of SAX based pipelines.  It also has caused us
to rethink how we do things.  What we came up with is truly better in the long
run.  Be happy that we didn't keep redirects _only_ in the sitemap (as was
originally proposed).  I championed the cause to allow them in Actions as well.
Beyond that, I highly doubt that it is technically feasible to allow them in
XSP--and reliably expect them to work.
 S/MIME Cryptographic Signature


RE: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread JEULIN Olivier

> > 2) load this page in your browser. (At this point, the page 
> > prints 'FOO  Hi,
> > I'm your ...' in my browser)
> 
> OK.

Do you see 'FOO ...' in your browser ? If not, what is the *complete* path
to the _clean-page.java file and the *complete* path to your clean-page.xml
file ? They should look like the same at the end (with '_' for java)

> 
> > 3) take a look in your repository and check the 
> > '_clean-page.java' to see if
> > its date of modification is the current time and date. If so 
> > search in it
> > for the string 'FOO'. You should find it, if the page is recreated
> > correctly.
> 
> OK. _clean-page.java created and it contains the modicication "FOO".
> 
> > And let's see what happens (please copy what you put in 
> > cocoon.properties
> > for the repository path)
> 
> processor.xsp.repository = /usr/share/java/repository
> 
> Waiting for further steps.
> 
> Thanks,
> Paolo.

-
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: AW: [C2] Redirects

2001-07-11 Thread Anders Lindh

>> Ok, thanks a lot for your info. I now understand it is possible, but
>> extremely complicated and verbose to do redirects in Cocoon2 :-)
>Oh, you aren't being fair.  Just because it is too easy to do in
>scripting frameworks, doesn't mean we should allow the same abuse
>of redirects in Cocoon.  You just have to think harder.

I have to agree on the first point. Migration from C1 to C2 is everything
else than compile & run, just because of this one thing. I agree that
using actions in the sitemap is a more clean solution, and yes, I agree that
program flow shouldn't be dictated in xsp pages. But couldn't this one
little
feature be implemented (with warnings, and some restrictions) just so that
C1 users could play around with C2 and enjoy the new features? I'd really
appreciate
it...

- Anders


-
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: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread Dongilli Paolo

> OK, let's try step by step :
> 0) restart cocoon; delete all the files named '_clean-page.*' in your
> repository 

DONE

> 1) in the (your servlet engine 
> path)/webapps/cocoon/samples/xsp directory,
> change the file 'clean-page.xml' by adding FOO to the 1st 
> paragraph like
> this:
>   FOO Hi, I'm your ...

DONE

> 2) load this page in your browser. (At this point, the page 
> prints 'FOO  Hi,
> I'm your ...' in my browser)

OK.

> 3) take a look in your repository and check the 
> '_clean-page.java' to see if
> its date of modification is the current time and date. If so 
> search in it
> for the string 'FOO'. You should find it, if the page is recreated
> correctly.

OK. _clean-page.java created and it contains the modicication "FOO".

> And let's see what happens (please copy what you put in 
> cocoon.properties
> for the repository path)

processor.xsp.repository = /usr/share/java/repository

Waiting for further steps.

Thanks,
Paolo.


> Olivier
> 
> > -Message d'origine-
> > De : Dongilli Paolo [mailto:[EMAIL PROTECTED]]
> > Envoyé : mercredi 11 juillet 2001 14:52
> > À : '[EMAIL PROTECTED]'
> > Objet : RE: XSP with Cocoon 1.8.1 - Cache Problem?
> > 
> > 
> > OK, I upgraded to C1.8.2.
> > Same problem: .java and .class files are re-created in the 
> > repository, but
> > in the browser after reloading I see the old version of 
> > "clean-page.xml".
> > In the original cocoon.properties I just changed the 
> > repository dir to an
> > absolute path. That's all.
> > 
> > Paolo.
> (...)
> 
> -
> 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]>




RE: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread JEULIN Olivier

OK, let's try step by step :
0) restart cocoon; delete all the files named '_clean-page.*' in your
repository 
1) in the (your servlet engine path)/webapps/cocoon/samples/xsp directory,
change the file 'clean-page.xml' by adding FOO to the 1st paragraph like
this:
FOO Hi, I'm your ...
2) load this page in your browser. (At this point, the page prints 'FOO  Hi,
I'm your ...' in my browser)
3) take a look in your repository and check the '_clean-page.java' to see if
its date of modification is the current time and date. If so search in it
for the string 'FOO'. You should find it, if the page is recreated
correctly.
And let's see what happens (please copy what you put in cocoon.properties
for the repository path)
Olivier

> -Message d'origine-
> De : Dongilli Paolo [mailto:[EMAIL PROTECTED]]
> Envoyé : mercredi 11 juillet 2001 14:52
> À : '[EMAIL PROTECTED]'
> Objet : RE: XSP with Cocoon 1.8.1 - Cache Problem?
> 
> 
> OK, I upgraded to C1.8.2.
> Same problem: .java and .class files are re-created in the 
> repository, but
> in the browser after reloading I see the old version of 
> "clean-page.xml".
> In the original cocoon.properties I just changed the 
> repository dir to an
> absolute path. That's all.
> 
> Paolo.
(...)

-
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: AW: [C2] Redirects

2001-07-11 Thread Berin Loritsch

Ulrich Mayring wrote:
> 
> Marcus Crafter wrote:
> >
> [...]
> 
> Ok, thanks a lot for your info. I now understand it is possible, but
> extremely complicated and verbose to do redirects in Cocoon2 :-)

Oh, you aren't being fair.  Just because it is too easy to do in
scripting frameworks, doesn't mean we should allow the same abuse
of redirects in Cocoon.  You just have to think harder.

> > I've found that over time, my sitemap testing has moved from focusing
> > on technical nitty gritty to focusing on concepts. Its a subtle
> > difference, but it makes conditional checking for your examples below
> > a little easier.
> 
> I'm all for thinking in concepts, but here comes my old gripe again: the
> Sitemap is a proprietary format, I don't want to put concepts into
> proprietary structures. Concepts are things that need to be communicated
> to other departments, to other companies, to end users - you want a
> generic XML structure for that, not a Cocoon-specific thing.

Regarding logic in the sitemap, I whole-heartedly agree.  Business logic
does not belong in the sitemap.  Period.  If you do that, your business
logic is at the mercy of the sitemap administrator.

Regarding the proprietary format: there was no standard for this type of
thing.  If you show us a standard on URI space management that keeps the
filesystem and the URI space orthagonal, we will definitely look at integrating
it.  Unfortunately, this is something that is up to whatever framework
you use.

Also regarding the proprietary format:  Cocoon can be used accross many
servlet engines.  This reduces the risk of using Cocoon.  If you decide
to switch frameworks, well you have the overhead of removing one
infrastructure and implementing a new one.  I don't care how "standard"
something is--there is always some point of a little rework that needs
to be done.

> > Now, be aware there is a trade off here, sending a redirect from
> > within an action will mean you'll have control flow code outside of
> > the sitemap.
> 
> IMHO control flow does not belong in the Sitemap at all, because it is a
> proprietary structure. It's ok to use proprietary structures as
> implementations of generic interfaces - but it's not good to tie
> developers to a specific, proprietary implementation of a generic
> concept.

I believe redirects as a result of business logic belong in Actions.  That
logic can be a result of a parameter or whatever--but I don't think the sitemap
is the place for it.  But given your previous arguments that you would argue
that Actions are also proprietary.  Try the advice I posted in another message:
create one Action that calls a session bean and redirects on a thrown exception.
That way, be passing a couple parameters, you can reuse the same Action for all
your complex business logic.

> > > Doing a 'grep -r sendRedirect * | wc -l' on the above app I get 104.
> > > Does this mean I have to write 104 actions? Or is it possible to write a
> > > generic redirect action
> >
> > If they are all totally different sendRedirect tests, used only once
> > in individual xsp pages, you may need to write a comprehensive set of
> > actions. But I expect in reality it will be a lot less than 104.
> > (without seeing your application. :-) )
> 
> Perhaps 80 or so. I think in its current state Cocoon2 ties me up too
> much, I want more freedom :-)

Does the solution I provided above work for you?  By tying your logic to session
beans, you have a portable infrastructure that minimizes dependance on some aspects
of Cocoon.
 S/MIME Cryptographic Signature


Re: AW: [C2] Redirects

2001-07-11 Thread Ulrich Mayring

Berin Loritsch wrote:
> 
> If you think of ways to minimize redirects, then you can minimize the number
> of Actions you have to write.

Heh, this reminds me of the discussion a few days ago, where I was
criticized for saying: "Don't use Internet Explorer and you won't incur
the IE/Cocoon/PDF problem." Now we're saying: "Don't use redirects and
you won't incure Cocoon2's redirect problem." :-)

> Another possibility is to create your own protocol.  You wrap your business
> logic in session beans (like you are supposed to do anyway), and call them
> from an Action.  If an Exception is thrown, you redirect.  Actions can be
> parameterized so you can specify three parameters (bean, method, redirect-to)
> and the one (1) Action will handle all the dirty work for you.

Using exceptions to control program flow? I think they should be
reserved for error-handling.

I'm not necessarily a big fan of redirects, but there is no other way
currently to control web program flow and now Cocoon2 is taking that
away as well :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

-
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: AW: [C2] Redirects

2001-07-11 Thread Berin Loritsch

Anders Lindh wrote:
> 
> >> Doing a 'grep -r sendRedirect * | wc -l' on the above app I get 104.
> >> Does this mean I have to write 104 actions? Or is it possible to write a
> >> generic redirect action
> >   If they are all totally different sendRedirect tests, used only once
> >   in individual xsp pages, you may need to write a comprehensive set of
> >   actions. But I expect in reality it will be a lot less than 104.
> >   (without seeing your application. :-) )
> 
> We are using a system with an EJB container in the background, and use
> cocoon to
> build a user interface. And it really works well. The problem is that our
> redirects
> often depend on more complex stuff than just a parameter value, our business
> logic (the
> beans) take care of as much as possible (including verifying more complex
> input), leaving
> the xsp pages quite lean and mean. How can this be done with the C2 sitemap
> architecture
> (actions?), as easily as possible? We may not have 104 redirects, but enough
> not to write
> an action for each...


I generally advocate writing actions as generically as possible.  I also
generally advocate trying not to use redirects.  I know that sometimes it
is not possible--but basically it forces me to think about elegant solutions
without using a hammer to do a screwdriver's job.  Redirects have specific
side affects to them:

* You have a brand new Request object, so anything you wanted to pass via
  Request attributes is gone.  The consequence is more information has to
  be stored in the Session object.

* You are changing your URL.  Sometimes this is the desired affect, so I can't
  fault it.  Other times, it is more desirable to mount a whole form to one
  URL, and iterate through the pages there.  The advantage is that noone can
  short-circuit the form.

* The biggest issue: not all web servers perform redirects equally.  I had
  issues using redirects in early versions of Cocoon2 and IBM WebSphere 3.5.2.
  WebSphere refused to redirect properly.  Many times it is a configuration issue,
  but in this case, the Servlet Container was buggy and did not transform the
  URL correctly.

If you think of ways to minimize redirects, then you can minimize the number
of Actions you have to write.

Another possibility is to create your own protocol.  You wrap your business
logic in session beans (like you are supposed to do anyway), and call them
from an Action.  If an Exception is thrown, you redirect.  Actions can be
parameterized so you can specify three parameters (bean, method, redirect-to)
and the one (1) Action will handle all the dirty work for you.
 S/MIME Cryptographic Signature


RE: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread Dongilli Paolo

OK, I upgraded to C1.8.2.
Same problem: .java and .class files are re-created in the repository, but
in the browser after reloading I see the old version of "clean-page.xml".
In the original cocoon.properties I just changed the repository dir to an
absolute path. That's all.

Paolo.

> -Original Message-
> From: JEULIN Olivier [mailto:[EMAIL PROTECTED]]
> Sent: Mittwoch, 11. Juli 2001 12:19
> To: '[EMAIL PROTECTED]'
> Subject: RE: XSP with Cocoon 1.8.1 - Cache Problem?
> 
> 
> Well, it could, that's why I advised you to upgrade: at 
> least, we could
> compare comparable things.
> 
> > -Message d'origine-
> > De : Dongilli Paolo [mailto:[EMAIL PROTECTED]]
> > Envoyé : mercredi 11 juillet 2001 12:16
> > À : '[EMAIL PROTECTED]'
> > Objet : RE: XSP with Cocoon 1.8.1 - Cache Problem?
> > > Yes, of course, if you java file has changed, you'll (well, 
> > > should) see the
> > > modification.
> > > I've added "foo" in the "I've bee requested...", and it 
> > > appears in the java
> > > file, as well as in the html page generated...
> > 
> > Is it possible that Cocoon internal cache isn't updated after 
> > the creation
> > of the new .java and .class files?
> > Could it be a problem of C1.8.1?
> > 
> > Paolo.
> (...)
> 
> -
> 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]>




Re: [C20] FP taglib

2001-07-11 Thread Jeremy Quinn

At 3:37 PM +0300 6/7/01, Viktors Rotanovs wrote:
>does FP taglib exist in Cocoon 2.0, or should I use
>something else to write to XML files?

It is not ported to C2 yet.
I hope to do it, but am too busy to do this at the moment.

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]>




Re: FP taglib and concurency access

2001-07-11 Thread Jeremy Quinn

At 10:52 AM +0200 6/7/01, LEBRETON Philippe wrote:
>does FP manage the concurrency access of the same node?

No, I am afraid it does not.

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]>




Building Cocoon 2 Error

2001-07-11 Thread Lok Yek Soon

Hi,

I'm using RH7, and have Tomcat 3.2 and JDK
running/installed.

I downloaded Cocoon CVS following the instructions
here:
http://xml.apache.org/cocoon2/install.html

when I try to build Cocoon WAR package using the
following command:


./build.sh  -Dinclude.webapp.libs=yes webapp

I got the following error message.

=
/home/samba/downloads/Dev-Related/webserver/xml-cocoon2/bin/ant:
line 107: 25414 Segmentat
ion fault  (core dumped) $JAVACMD -classic
-classpath "$LOCALCLASSPATH" -Dant.home="${
ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main "$@"
=


how can I rectify it?


NOTE: I assume Tomcat do not come with Cocoon
pre-installed.

thanks
YekSoon

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

-
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: AW: [C2] Redirects

2001-07-11 Thread Anders Lindh

>> Doing a 'grep -r sendRedirect * | wc -l' on the above app I get 104.
>> Does this mean I have to write 104 actions? Or is it possible to write a
>> generic redirect action
>   If they are all totally different sendRedirect tests, used only once
>   in individual xsp pages, you may need to write a comprehensive set of
>   actions. But I expect in reality it will be a lot less than 104.
>   (without seeing your application. :-) )


We are using a system with an EJB container in the background, and use
cocoon to
build a user interface. And it really works well. The problem is that our
redirects
often depend on more complex stuff than just a parameter value, our business
logic (the
beans) take care of as much as possible (including verifying more complex
input), leaving
the xsp pages quite lean and mean. How can this be done with the C2 sitemap
architecture
(actions?), as easily as possible? We may not have 104 redirects, but enough
not to write
an action for each...

- Anders Lindh


-
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: Sorting search results in Cocoon

2001-07-11 Thread Sergio Carvalho


The most efficient way would be to limit the XML source - having the search engine do 
the sorting and limiting for yourself. That being impossible, you can do it with an 
XSLT transformation for sorting: 
 http://www.w3.org/TR/xslt.html#sorting
 http://www.w3.org/TR/xslt.html#copying
and another to select the topmost N:
 http://www.w3.org/TR/xslt.html#section-Applying-Template-Rules
 http://www.w3.org/TR/xpath.html#function-position

You can get better help at XML/XSL specific mailing lists.

On Tue, 10 Jul 2001 15:27:19 -0400, Jason Smith <[EMAIL PROTECTED]> wrote:
--
> I'm kind of new at this whole XML/XSP/XSL thing, so if this has a simple
> solution,
> please bear with me.
> 
> Here's the situation: I have a search engine that passes out search results
> as XML
> to anything that can make a HTTP request to it. When it returns the results,
> it looks 
> something like this:
> 
> 
>   
>   Result 1
>   This is result 1
>   http://here.com/index.html
>   2.3
>   
> 
>   
>   Result 2
>   This is another result
>   http://there.com/index.html
>   1.2
>  
> 
>   etc.
> 
> 
> 
> The  elements can be repeated infinitely depending on how many
> search
> results the engine finds that match search query.  is the search
> result's 
> ranking against the search query; the rest of the elements in  are 
> self-explanatory. 
> 
> The search engine returns ALL matches at once in one big XML file. There
> could be a dozen search results, 100, or 1.
> 
> How would one go about limiting those results in Cocoon? Say I get 100
> results,
> but I only want to display the top 10 results by score. I'm assuming XSP
> is the answer, but I've been going nuts trying to get this stuff to work.
> I have O'Reilly's "Java and XML" on back-order, so hopefully that can clear
> up my confusion, but until then, anybody got any ideas or some direction
> for me?
> 
> Thanks for any help.
> 
> J
> 
> -
> 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]>



--
Sergio Carvalho
---
[EMAIL PROTECTED]

If at first you don't succeed, skydiving is not for you

-
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: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread JEULIN Olivier

Well, it could, that's why I advised you to upgrade: at least, we could
compare comparable things.

> -Message d'origine-
> De : Dongilli Paolo [mailto:[EMAIL PROTECTED]]
> Envoyé : mercredi 11 juillet 2001 12:16
> À : '[EMAIL PROTECTED]'
> Objet : RE: XSP with Cocoon 1.8.1 - Cache Problem?
> > Yes, of course, if you java file has changed, you'll (well, 
> > should) see the
> > modification.
> > I've added "foo" in the "I've bee requested...", and it 
> > appears in the java
> > file, as well as in the html page generated...
> 
> Is it possible that Cocoon internal cache isn't updated after 
> the creation
> of the new .java and .class files?
> Could it be a problem of C1.8.1?
> 
> Paolo.
(...)

-
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: AW: [C2] Redirects

2001-07-11 Thread Ulrich Mayring

Marcus Crafter wrote:
> 
[...]

Ok, thanks a lot for your info. I now understand it is possible, but
extremely complicated and verbose to do redirects in Cocoon2 :-)

> I've found that over time, my sitemap testing has moved from focusing
> on technical nitty gritty to focusing on concepts. Its a subtle
> difference, but it makes conditional checking for your examples below
> a little easier.

I'm all for thinking in concepts, but here comes my old gripe again: the
Sitemap is a proprietary format, I don't want to put concepts into
proprietary structures. Concepts are things that need to be communicated
to other departments, to other companies, to end users - you want a
generic XML structure for that, not a Cocoon-specific thing.

> Now, be aware there is a trade off here, sending a redirect from
> within an action will mean you'll have control flow code outside of
> the sitemap.

IMHO control flow does not belong in the Sitemap at all, because it is a
proprietary structure. It's ok to use proprietary structures as
implementations of generic interfaces - but it's not good to tie
developers to a specific, proprietary implementation of a generic
concept.

> > Doing a 'grep -r sendRedirect * | wc -l' on the above app I get 104.
> > Does this mean I have to write 104 actions? Or is it possible to write a
> > generic redirect action
> 
> If they are all totally different sendRedirect tests, used only once
> in individual xsp pages, you may need to write a comprehensive set of
> actions. But I expect in reality it will be a lot less than 104.
> (without seeing your application. :-) )

Perhaps 80 or so. I think in its current state Cocoon2 ties me up too
much, I want more freedom :-)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

-
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: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread Dongilli Paolo

> Yes, of course, if you java file has changed, you'll (well, 
> should) see the
> modification.
> I've added "foo" in the "I've bee requested...", and it 
> appears in the java
> file, as well as in the html page generated...

Is it possible that Cocoon internal cache isn't updated after the creation
of the new .java and .class files?
Could it be a problem of C1.8.1?

Paolo.


> Olivier
> 
>  -Message d'origine-
> > De : Dongilli Paolo [mailto:[EMAIL PROTECTED]]
> > Envoyé : mercredi 11 juillet 2001 11:46
> > À : '[EMAIL PROTECTED]'
> > Objet : RE: XSP with Cocoon 1.8.1 - Cache Problem?
> > 
> > 
> > > Well, you should upgrade to C1.8.2 (latest versions always 
> > > have less bugs,
> > > if this is one).
> > > This example works fine (the page counter is incremented 
> > > everytime I reload
> > > the page) with C1.8.2 NS, lynx and IE...
> > 
> > But have you tried to modify for example the text of 
> > clean-page.xml and to
> > reload it then?
> > In my case the counter goes on and I continue to see the 
> old version. 
> > Please let me know.
> > 
> > Thanks a lot,
> > Paolo.
> (.)
> 
> -
> 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]>




RE: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread JEULIN Olivier

Yes, of course, if you java file has changed, you'll (well, should) see the
modification.
I've added "foo" in the "I've bee requested...", and it appears in the java
file, as well as in the html page generated...
Olivier

 -Message d'origine-
> De : Dongilli Paolo [mailto:[EMAIL PROTECTED]]
> Envoyé : mercredi 11 juillet 2001 11:46
> À : '[EMAIL PROTECTED]'
> Objet : RE: XSP with Cocoon 1.8.1 - Cache Problem?
> 
> 
> > Well, you should upgrade to C1.8.2 (latest versions always 
> > have less bugs,
> > if this is one).
> > This example works fine (the page counter is incremented 
> > everytime I reload
> > the page) with C1.8.2 NS, lynx and IE...
> 
> But have you tried to modify for example the text of 
> clean-page.xml and to
> reload it then?
> In my case the counter goes on and I continue to see the old version. 
> Please let me know.
> 
> Thanks a lot,
> Paolo.
(.)

-
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: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread Dongilli Paolo

> Well, you should upgrade to C1.8.2 (latest versions always 
> have less bugs,
> if this is one).
> This example works fine (the page counter is incremented 
> everytime I reload
> the page) with C1.8.2 NS, lynx and IE...

But have you tried to modify for example the text of clean-page.xml and to
reload it then?
In my case the counter goes on and I continue to see the old version. 
Please let me know.

Thanks a lot,
Paolo.


> 
> (...)
> > > It's probably a navigator's cache problem. Especially with IE 
> > > (you can't
> > > deactivate the cache).
> > > Try to clear your navigator's cache
> > 
> > I tried with Netscape 4.76, with Lynx and I still see the old 
> > version of the
> > document. 
> > The sole solution is to restart Cocoon in order to see the 
> > modifications. 
> > I don't want to restart Cocoon each time I modify an xml 
> > (xsp) document.
> > Please help me fix this.
> > 
> > Thank you,
> > Paolo.
> > > > -Message d'origine-
> > > > De : Dongilli Paolo [mailto:[EMAIL PROTECTED]]
> > > > Envoyé : mardi 10 juillet 2001 20:17
> > > > À : '[EMAIL PROTECTED]'
> > > > Objet : XSP with Cocoon 1.8.1 - Cache Problem?
> > > > 
> > > > 
> > > > I tried to modify just some text in the sample file 
> > > > "clean-page.xml" in the
> > > > samples/xsp directory of Cocoon 1.8.1.
> > > > 
> > > > I reloaded the page in the browser and the java files are 
> > > > newly created and
> > > > compiled in the repository but the output (after the XSLT) is 
> > > > always the
> > > > same I had before the modification.
> > > > 
> > > > I read the FAQ first but I didn't find a solution.
> > > > 
> > > > Hopefully somebody have some idea about this.
> > > > 
> > > > Thanks a lot,
> > > > Paolo.
> 
> -
> 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]>




Re: AW: [C2] Redirects

2001-07-11 Thread Marcus Crafter

Hi Ulrich,

I've found that over time, my sitemap testing has moved from focusing
on technical nitty gritty to focusing on concepts. Its a subtle
difference, but it makes conditional checking for your examples below
a little easier.

On Wed, 11 Jul 2001, Ulrich Mayring wrote:

> But how to do that conditionally then? Here's some code from one of my
> Cocoon1 apps:
> 
> String param = request.getParameter("param");
> if (param == null||param.equals(""))
> response.sendRedirect("error.xml?apperror=1526");

You could do this in the sitemap testing the value of param for null
or "", and then using map:redirect-to. 


 
  
 
 


All you need there is a selector which will bring the request
parameter 'param' into scope for testing. Not to difficult to write (I
posted an interpreter based param selector to the list
october/november last year).

Generically speaking, you can do this kind of test/redirect with any
resource. Selectors can test anything.

Note, for parameter testing, I might not follow this approach - if you
need to test 10 form values for example. (as you can see, you'll end
up with an extensive sitemap containing too much detail - this is what
I was describing above, with my shift from describing technical detail
in sitemap pipelines, to concepts).

I would write a validation action.


 
 


And use the Redirector element of the action API. Then your code above
goes into the validation action you write (almost exactly as it is
above), with the call being redirector.redirect(..); instead of
response.sendRedirect(..).

What you've done above will work, you just need to relocate the code
out of your xsp page, into an action class. Optionally, you could
also write a c2 generic or application specific validator class to
reuse code. (there's already a generic formvalidatoraction in the c2
source now).

Now, be aware there is a trade off here, sending a redirect from
within an action will mean you'll have control flow code outside of
the sitemap.

An alternative is to return a value from your action to the sitemap
for testing and then sitemap redirection.


 
 
  
   
  
  
   
  
 


In this case you'll need to write an action and a selector.  

As you can see, the trade off here is in sitemap size, complexity
and readability. I am not baised to either, as I see benefits in both
approaches. The other developers might see this differently. The
choice is up to you.

> This redirects the user to an error page, if his input is not ok. I have
> lines like this in most of my XSP pages. Another example:
> 
> if (status.startsWith("active")) {
>   // Send notification mail
>   response.sendRedirect("mail/NOTIFY_CUSTOMER.xml");
> else if (status.startsWith("begin")) {
>   // Send error fax
>   response.sendRedirect("fax/NOTIFY_CUSTOMER.xml");
> 
> Doing a 'grep -r sendRedirect * | wc -l' on the above app I get 104.
> Does this mean I have to write 104 actions? Or is it possible to write a
> generic redirect action

If they are all totally different sendRedirect tests, used only once
in individual xsp pages, you may need to write a comprehensive set of
actions. But I expect in reality it will be a lot less than 104.
(without seeing your application. :-) )

Hope that helps.

Cheers,

Marcus

-- 
.
 ,,$,  Marcus Crafter
;$'  ':Computer Systems Engineer
$: :   Open Software Associates GmbH
 $   o_)$$$:   82-84 Mainzer Landstrasse
 ;$,_/\ &&:'   60327 Frankfurt Germany
   ' /( &&&
   \_' Email : [EMAIL PROTECTED]
  .Business Hours : +49 69 9757 200
&&&:


-
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: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread JEULIN Olivier

Well, you should upgrade to C1.8.2 (latest versions always have less bugs,
if this is one).
This example works fine (the page counter is incremented everytime I reload
the page) with C1.8.2 NS, lynx and IE...

(...)
> > It's probably a navigator's cache problem. Especially with IE 
> > (you can't
> > deactivate the cache).
> > Try to clear your navigator's cache
> 
> I tried with Netscape 4.76, with Lynx and I still see the old 
> version of the
> document. 
> The sole solution is to restart Cocoon in order to see the 
> modifications. 
> I don't want to restart Cocoon each time I modify an xml 
> (xsp) document.
> Please help me fix this.
> 
> Thank you,
> Paolo.
> > > -Message d'origine-
> > > De : Dongilli Paolo [mailto:[EMAIL PROTECTED]]
> > > Envoyé : mardi 10 juillet 2001 20:17
> > > À : '[EMAIL PROTECTED]'
> > > Objet : XSP with Cocoon 1.8.1 - Cache Problem?
> > > 
> > > 
> > > I tried to modify just some text in the sample file 
> > > "clean-page.xml" in the
> > > samples/xsp directory of Cocoon 1.8.1.
> > > 
> > > I reloaded the page in the browser and the java files are 
> > > newly created and
> > > compiled in the repository but the output (after the XSLT) is 
> > > always the
> > > same I had before the modification.
> > > 
> > > I read the FAQ first but I didn't find a solution.
> > > 
> > > Hopefully somebody have some idea about this.
> > > 
> > > Thanks a lot,
> > > Paolo.

-
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: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread Dongilli Paolo

> It's probably a navigator's cache problem. Especially with IE 
> (you can't
> deactivate the cache).
> Try to clear your navigator's cache

I tried with Netscape 4.76, with Lynx and I still see the old version of the
document. 
The sole solution is to restart Cocoon in order to see the modifications. 
I don't want to restart Cocoon each time I modify an xml (xsp) document.
Please help me fix this.

Thank you,
Paolo.

> 
> > -Message d'origine-
> > De : Dongilli Paolo [mailto:[EMAIL PROTECTED]]
> > Envoyé : mardi 10 juillet 2001 20:17
> > À : '[EMAIL PROTECTED]'
> > Objet : XSP with Cocoon 1.8.1 - Cache Problem?
> > 
> > 
> > I tried to modify just some text in the sample file 
> > "clean-page.xml" in the
> > samples/xsp directory of Cocoon 1.8.1.
> > 
> > I reloaded the page in the browser and the java files are 
> > newly created and
> > compiled in the repository but the output (after the XSLT) is 
> > always the
> > same I had before the modification.
> > 
> > I read the FAQ first but I didn't find a solution.
> > 
> > Hopefully somebody have some idea about this.
> > 
> > Thanks a lot,
> > Paolo.
> 
> -
> 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]>




inserting xml tags with xsp

2001-07-11 Thread franck delarue

hello,
I'm still searching how to insert xml tags with a xsp
page.
I'm trying to use the
 tag, but when I just declare the
namespace : 
xmlns:util="http://www.apache.org/1999/XSP/Util"; 
in my xsp page, which is very simple (the most).
Cocoon2 throws me an error :

   org.apache.cocoon.ProcessingException: Language
  
Exception:org.apache.cocoon.components.language.Languag
   eException: Error compiling service_xsp:
 Line 94, column 75: '}' expected.


? do i have the wrong adress of the namespace ? is it
still possible to use the tags util with cocoon2 ?

thanks in advance (cocoon2 + linux reshat + tomcat).


=
_____ 
\ \  |  _  |  \
 \  F R A N C K D E L A R U E  \ | |_  | | |
 /  + - + - + - + - + - + - +  / |  _  | | |
/_/  |_|   |__/

___
Do You Yahoo!? -- Pour faire vos courses sur le Net, 
Yahoo! Shopping : http://fr.shopping.yahoo.com

-
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: XSP with Cocoon 1.8.1 - Cache Problem?

2001-07-11 Thread JEULIN Olivier

It's probably a navigator's cache problem. Especially with IE (you can't
deactivate the cache).
Try to clear your navigator's cache

> -Message d'origine-
> De : Dongilli Paolo [mailto:[EMAIL PROTECTED]]
> Envoyé : mardi 10 juillet 2001 20:17
> À : '[EMAIL PROTECTED]'
> Objet : XSP with Cocoon 1.8.1 - Cache Problem?
> 
> 
> I tried to modify just some text in the sample file 
> "clean-page.xml" in the
> samples/xsp directory of Cocoon 1.8.1.
> 
> I reloaded the page in the browser and the java files are 
> newly created and
> compiled in the repository but the output (after the XSLT) is 
> always the
> same I had before the modification.
> 
> I read the FAQ first but I didn't find a solution.
> 
> Hopefully somebody have some idea about this.
> 
> Thanks a lot,
> Paolo.

-
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: AW: [C2] Redirects

2001-07-11 Thread Christian Haul

On 11.Jul.2001 -- 10:08 AM, Ulrich Mayring wrote:
> Carsten Ziegeler wrote:
> > 
> >The right place for application flow and redirects is the sitemap in
> >c2. So you can make redirects in the sitemap using the map:redirect-to
> >element or you can write your custom action which can do a redirect.
> 
> But how to do that conditionally then? Here's some code from one of my
> Cocoon1 apps:
> 
> String param = request.getParameter("param");
> if (param == null||param.equals(""))
> response.sendRedirect("error.xml?apperror=1526");
> 
> This redirects the user to an error page, if his input is not ok. I have
> lines like this in most of my XSP pages. Another example:
> 
> if (status.startsWith("active")) {
>   // Send notification mail
>   response.sendRedirect("mail/NOTIFY_CUSTOMER.xml");
> else if (status.startsWith("begin")) {
>   // Send error fax
>   response.sendRedirect("fax/NOTIFY_CUSTOMER.xml");
> 
> Doing a 'grep -r sendRedirect * | wc -l' on the above app I get 104.
> Does this mean I have to write 104 actions? Or is it possible to write a
> generic redirect action - in that case it should be included in the
> distribution :)

Have a look at the form validation action and request parameter value
selctor(*) provided with cocoon2

Chris.

(*) will appear today in HEAD

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
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]>




JPython + cache control

2001-07-11 Thread franck delarue

hello,
I use JPython's pages to produce xml ( JPython -> xml
-> html ) with cocoon2 and tomcat on linux redhat.
I've seen that there is a possibility of controling
the cache of cocoon with xsp pages ( using the method
"hasChanged"). Is there any way  to do this with
JPython ? (I use a database and would like to reload
the JPython page only if the database has changed).

Thanks in advance.

=
_____ 
\ \  |  _  |  \
 \  F R A N C K D E L A R U E  \ | |_  | | |
 /  + - + - + - + - + - + - +  / |  _  | | |
/_/  |_|   |__/

___
Do You Yahoo!? -- Pour faire vos courses sur le Net, 
Yahoo! Shopping : http://fr.shopping.yahoo.com

-
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: AW: [C2] Redirects

2001-07-11 Thread Ulrich Mayring

Carsten Ziegeler wrote:
> 
>The right place for application flow and redirects is the sitemap in
>c2. So you can make redirects in the sitemap using the map:redirect-to
>element or you can write your custom action which can do a redirect.

But how to do that conditionally then? Here's some code from one of my
Cocoon1 apps:

String param = request.getParameter("param");
if (param == null||param.equals(""))
response.sendRedirect("error.xml?apperror=1526");

This redirects the user to an error page, if his input is not ok. I have
lines like this in most of my XSP pages. Another example:

if (status.startsWith("active")) {
// Send notification mail
response.sendRedirect("mail/NOTIFY_CUSTOMER.xml");
else if (status.startsWith("begin")) {
// Send error fax
response.sendRedirect("fax/NOTIFY_CUSTOMER.xml");

Doing a 'grep -r sendRedirect * | wc -l' on the above app I get 104.
Does this mean I have to write 104 actions? Or is it possible to write a
generic redirect action - in that case it should be included in the
distribution :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

-
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]>




AW: [C2] Redirects

2001-07-11 Thread Stefan Seifert

> > Anders Lindh wrote:
> > > 
> > > Migrating from C1 becomes so much more complicated
> > > when XSP redirects are not available...
> > 
> > I agree. There's no way I can port my old Cocoon1 apps 
> without redirects
> > being available conditionally (i.e. depending on user 
> input). Perhaps
> > this is possible with the Sitemap, but I don't know how.
> 
> You should definitly have a look into actions...
> --
> Torsten

This works perfectly using actions. I solved a problem where the
stylesheet for a document depends on a field in the database using
actions.
I think you can solve nearly everything with the action concept, though
its on the first sight a bit more complicated than in cocoon 1 (but it's
better designed now).

Stefan

-
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: [C2] Redirects

2001-07-11 Thread Torsten Curdt

> Anders Lindh wrote:
> > 
> > Migrating from C1 becomes so much more complicated
> > when XSP redirects are not available...
> 
> I agree. There's no way I can port my old Cocoon1 apps without redirects
> being available conditionally (i.e. depending on user input). Perhaps
> this is possible with the Sitemap, but I don't know how.

You should definitly have a look into actions...
--
Torsten

-
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: [C2] Redirects

2001-07-11 Thread Ulrich Mayring

Anders Lindh wrote:
> 
> Migrating from C1 becomes so much more complicated
> when XSP redirects are not available...

I agree. There's no way I can port my old Cocoon1 apps without redirects
being available conditionally (i.e. depending on user input). Perhaps
this is possible with the Sitemap, but I don't know how.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

-
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]>




AW: [C2] Redirects

2001-07-11 Thread Carsten Ziegeler

Hi,

we had several month ago a lengthy discussion about this redirection
thing.

These are the two major reasons for removing the redirect from the xsp:

1. Working in a servlet environment and doing redirects is not that easy.
   If you do a redirect when something is written already to the output
   it is strictly forbidden by the servlet api.
   As when the XSP is executed there might be something already written
   to the output, the redirect might not work in some cases.
2. We believe that the web application flow has nothing to do with the
   content. As the XSP is building content it is the wrong place for
   redirects.
   The right place for application flow and redirects is the sitemap in
   c2. So you can make redirects in the sitemap using the map:redirect-to
   element or you can write your custom action which can do a redirect.


Carsten

Open Source GroupsunShine - b:Integrated

Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de  mailto: [EMAIL PROTECTED]



> -Ursprüngliche Nachricht-
> Von: Anders Lindh [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 11. Juli 2001 08:18
> An: [EMAIL PROTECTED]
> Betreff: [C2] Redirects
>
>
>
> I'm sending this again as I didn't get an answer last time...
>
>
>
> Hi,
>
> I know this issue has been discussed many times earlier on this list, but
> I couldn't find a conclusion to why response.sendRedirect has been removed
> from XSPResponseHelper (supposedly has to do with SAX?). Are
> there any known
> work-arounds for this? I really need to be able to issue
> redirects from XSP
> pages,
> and not from the sitemap. Migrating from C1 becomes so much more
> complicated
> when
> XSP redirects are not available...
>
> Thanks,
>
> -
> Anders Lindh
>
>
> -
> 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]>




RE: Sorting search results in Cocoon

2001-07-11 Thread Beauprez Sven


Jason,

Here is a possible solution for C2 (don't know which version you are using)
The sorting part is the most difficult part. If it is possible to let the
searchengine sort the results, you should go for this approach. Otherwise
you have to write a transformer which does the sorting, but this won't be
possible without storing the result in an intermediate datastructure, which
you have to sort and which you have to stream into SAX events again
afterwards.
When this is done, you can reuse some transformers in C2: FilterTransformer,
WriteDOMSessionTransformer and ReadDOMSessionTransformer. See the
documentation for SQLTransformer for more info on these...


Sven



> -Original Message-
> From: Jason Smith [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 10, 2001 9:27 PM
> To: '[EMAIL PROTECTED]'
> Subject: Sorting search results in Cocoon
> 
> 
> I'm kind of new at this whole XML/XSP/XSL thing, so if this 
> has a simple
> solution,
> please bear with me.
> 
> Here's the situation: I have a search engine that passes out 
> search results
> as XML
> to anything that can make a HTTP request to it. When it 
> returns the results,
> it looks 
> something like this:
> 
> 
>   
>   Result 1
>   This is result 1
>   http://here.com/index.html
>   2.3
>   
> 
>   
>   Result 2
>   This is another result
>   http://there.com/index.html
>   1.2
>  
> 
>   etc.
> 
> 
> 
> The  elements can be repeated infinitely depending on how many
> search
> results the engine finds that match search query.  is 
> the search
> result's 
> ranking against the search query; the rest of the elements in 
>  are 
> self-explanatory. 
> 
> The search engine returns ALL matches at once in one big XML 
> file. There
> could be a dozen search results, 100, or 1.
> 
> How would one go about limiting those results in Cocoon? Say I get 100
> results,
> but I only want to display the top 10 results by score. I'm 
> assuming XSP
> is the answer, but I've been going nuts trying to get this 
> stuff to work.
> I have O'Reilly's "Java and XML" on back-order, so hopefully 
> that can clear
> up my confusion, but until then, anybody got any ideas or 
> some direction
> for me?
> 
> Thanks for any help.
> 
> J
> 
> -
> 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]>