java problem in XSP

2004-09-09 Thread sreenivas reddy
Hi


  Process p=Runtime.getRuntime().exec(arg);
//in linux
BufferedReader br =new BufferedReader(new
InputStreamReader(p.getInputStream()));
  while ((line = br.readLine()) != null){ 
System.out.println("line:"+sLine); }



 
I observe that for  
1) arg="cp --help" it is returning something  but for
  arg="cp" there is nothing output
is there any otherway to print?


=
Thanks & Regards,

Y.S.Sreenivas Reddy,
Sirivsetti Global Services,
Hyderabad.
Phone :+91-040-55330396
cell:+91 9849313313

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Should static files be cached serverside?

2004-09-09 Thread Kees van Dieren
Thank you for that link! it will be of much use for me in future.
Kees
Robin Wyles wrote:
Hi...
You can find some useful information on Apache/Cocoon and serving 
static content here:

http://wiki.apache.org/cocoon/ApacheModProxy
Robin.
On 9 Sep 2004, at 17:37, Gerald Aichholzer wrote:
On Thu, 9 Sep 2004 08:11:56 -0700 (PDT), Ralph Goers 
<[EMAIL PROTECTED]> wrote:

Gerald Aichholzer said:
On Thu, 9 Sep 2004 07:34:10 -0700 (PDT), Ralph Goers
Well, by clicking on a href="/miracle/app/cook/info.gif" in my
xhtml-source-code my browser connects to the following address:
   http://server:/miracle/app/cook/info.gif
But if I want to serve static content with apache, it should be
   http://server:80/miracle/app/cook/info.gif
Do I have to modify my generated xhtml-code to achieve this or
do I have to edit apache's configuration file only?
When done properly your links will be the same as they are.  All 
incoming
requests go to apache at port 80. Apache forwards the stuff it isn't
handling to the servlet container (in this case at ).  This is an
extremely common configuration (not just for Cocoon). You should search
the Apache http server site for more information.

Hi Ralph,
thanx for your answer - in my test some days ago using TinyWeb
I was explicitly putting "http://server:80/"; as prefix to the
href- resp. src-attribute values.
Anyway - I'm not quite sure if serving static content using
Apache would be an advantage in my situation. My application
reads sentences of a symbolic language from a XML-source and
converts the data to XHTML. The resulting page in the browser
contains many images, but there're many duplicates (because
most symbols are used two or more times).
Might cocoon's caching be an advantage under this circum-
stances?
thanx,
Gerald
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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

--
Kees van Dieren
Bram Groenewegeweg 8
4693 PP Poortvliet
The Netherlands
T: 0031 166 617132
M: 0031 6 43068619
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


encodeUrl Transformer and unicode

2004-09-09 Thread Doug Chestnut
Hi All,
I am working on a project in cocoon where I need to encode url strings (that
contain diacritics) in an xml document like described on this page:
http://www.w3.org/International/O-URL-code.html

Is there any reason why the encodeURL Transformer doesn't do this?
( http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=107638965522631&w=2 )

Is there an easy way to encode unicode (w/ no ascii equivilent) characters
in a sitemap pipeline?

I guess if this is not available I could just extend the encodeURL
Transformer to use this:
http://www.w3.org/International/URLUTF8Encoder.java

Thanks for the help,

--Doug


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



Re: Should static files be cached serverside?

2004-09-09 Thread Ralph Goers



Gerald Aichholzer said:
>
> Hi Ralph,
>
> thanx for your answer - in my test some days ago using TinyWeb
> I was explicitly putting "http://server:80/"; as prefix to the
> href- resp. src-attribute values.
>
> Anyway - I'm not quite sure if serving static content using
> Apache would be an advantage in my situation. My application
> reads sentences of a symbolic language from a XML-source and
> converts the data to XHTML. The resulting page in the browser
> contains many images, but there're many duplicates (because
> most symbols are used two or more times).
>
> Might cocoon's caching be an advantage under this circum-
> stances?

Probably not.  If you are accessing the images via urls in your page then
serving them from apache will almost certainly be faster.  Caching in
Cocoon really helps in cutting down on building the dynamic content over
and over again, but it just can't serve static content as fast as apache.

Ralph


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



[Repost] "no control flows defined", but there are!?

2004-09-09 Thread Lars Huttar
Dear Cocoon list,

Please excuse this repost, but I'm fairly stuck on this problem,
and can't make progress on starting to use CForms until I solve it.
I'm running Cocoon 2.1.5.1 under Jetty (even though it says Tomcat
below... it says that because my application folder, "gem", is
shared between two different versions of Cocoon).
I've also tried this under Cocoon 2.1.5 and get the same error.


I'm having some trouble setting up a simple CForms example. I'm
following the instructions at
http://cocoon.apache.org/2.1/userdocs/forms/sample.html
but modifying things cosmetically for my own example.

My problem is, when I try to access anything via the sitemap
that governs my example, the sitemap fails to load, with the
following error:

org.apache.cocoon.ProcessingException:
Failed to load sitemap from file:/c:/Program Files/Apache Group/Tomcat
4.1/webapps/cocoon/mount/gem/test/sitemap.xmap:
org.apache.avalon.framework.configuration.ConfigurationException:
This sitemap contains no control flows defined, cannot call at
file:/c:/Program%20Files/Apache%20Group/Tomcat%204.1/webapps/cocoon/mount/gem/test/sitemap.xmap:28:
54.
Define a control flow using , with embedded  elements.

It says the sitemap contains no control flows defined, yet I have
one defined just like it's specified in the instructions:

 
  
 
(under )

My flow/update.js file looks like this:

 cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");

 function update_Linguistic_Subgroup() {
 var form = new Form("forms/update-Linguistic_Subgroup.xml");

 form.showForm("update-display-pipeline");

 var model = form.getModel();
 var bizdata = { "LS_name" : model.name }
 cocoon.sendPage("update-success-pipeline", bizdata);
 }

Could the error above be caused by this update.js file containing
some sort of error and therefore failing to load?
E.g. if Form.js (first line) is not found?
However, sample files like
  samples/blocks/forms/flow/registration.js
load the same Form.js, and they have no such problems.

As I mentioned in a separate email, the files involved can be found at
 http://www.huttar.net/lars-kathy/tmp/sitemap.xmap
 .../index.html
 .../flow/update.js
 .../forms/update_success.jx
 .../forms/update-Linguistic_Subgroup.xml
 .../forms/update-Linguistic_Subgroup-template.xml

Thanks for any hints,
Lars


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



Re: Should static files be cached serverside?

2004-09-09 Thread Robin Wyles
Hi...
You can find some useful information on Apache/Cocoon and serving 
static content here:

http://wiki.apache.org/cocoon/ApacheModProxy
Robin.
On 9 Sep 2004, at 17:37, Gerald Aichholzer wrote:
On Thu, 9 Sep 2004 08:11:56 -0700 (PDT), Ralph Goers 
<[EMAIL PROTECTED]> wrote:

Gerald Aichholzer said:
On Thu, 9 Sep 2004 07:34:10 -0700 (PDT), Ralph Goers
Well, by clicking on a href="/miracle/app/cook/info.gif" in my
xhtml-source-code my browser connects to the following address:
   http://server:/miracle/app/cook/info.gif
But if I want to serve static content with apache, it should be
   http://server:80/miracle/app/cook/info.gif
Do I have to modify my generated xhtml-code to achieve this or
do I have to edit apache's configuration file only?
When done properly your links will be the same as they are.  All 
incoming
requests go to apache at port 80. Apache forwards the stuff it isn't
handling to the servlet container (in this case at ).  This is an
extremely common configuration (not just for Cocoon). You should 
search
the Apache http server site for more information.

Hi Ralph,
thanx for your answer - in my test some days ago using TinyWeb
I was explicitly putting "http://server:80/"; as prefix to the
href- resp. src-attribute values.
Anyway - I'm not quite sure if serving static content using
Apache would be an advantage in my situation. My application
reads sentences of a symbolic language from a XML-source and
converts the data to XHTML. The resulting page in the browser
contains many images, but there're many duplicates (because
most symbols are used two or more times).
Might cocoon's caching be an advantage under this circum-
stances?
thanx,
Gerald
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Re: Should static files be cached serverside?

2004-09-09 Thread Gerald Aichholzer
On Thu, 9 Sep 2004 08:11:56 -0700 (PDT), Ralph Goers  
<[EMAIL PROTECTED]> wrote:

Gerald Aichholzer said:
On Thu, 9 Sep 2004 07:34:10 -0700 (PDT), Ralph Goers
Well, by clicking on a href="/miracle/app/cook/info.gif" in my
xhtml-source-code my browser connects to the following address:
   http://server:/miracle/app/cook/info.gif
But if I want to serve static content with apache, it should be
   http://server:80/miracle/app/cook/info.gif
Do I have to modify my generated xhtml-code to achieve this or
do I have to edit apache's configuration file only?
When done properly your links will be the same as they are.  All incoming
requests go to apache at port 80. Apache forwards the stuff it isn't
handling to the servlet container (in this case at ).  This is an
extremely common configuration (not just for Cocoon). You should search
the Apache http server site for more information.
Hi Ralph,
thanx for your answer - in my test some days ago using TinyWeb
I was explicitly putting "http://server:80/"; as prefix to the
href- resp. src-attribute values.
Anyway - I'm not quite sure if serving static content using
Apache would be an advantage in my situation. My application
reads sentences of a symbolic language from a XML-source and
converts the data to XHTML. The resulting page in the browser
contains many images, but there're many duplicates (because
most symbols are used two or more times).
Might cocoon's caching be an advantage under this circum-
stances?
thanx,
Gerald
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Advantage using Hibernate with Cocoon

2004-09-09 Thread Ugo Cei
Il giorno 09/set/04, alle 16:47, Derek Hohls ha scritto:
I hope your talk will be online, for those of us not
lucky enough to make the events?
Last year's GT talks were recorded and made available online as video 
files. I hope someone will do the same with this year's talks.

Ugo
--
Ugo Cei - http://beblogging.com/


smime.p7s
Description: S/MIME cryptographic signature


Re: Treating strings passed to templates as markup?

2004-09-09 Thread Emmanuel Charpentier

  ...
  may disable that kind of transformation.


On Wed, Sep 08, 2004 at 03:52:05PM +0200, Thomas Kjeldahl Nilsson wrote:
> Hello!
> 
> Problem: I'm trying to pass a string to a jx template. The passed string 
> contains html markup which I want the generator\serializer to parse and 
> serialize. However, the following sendpage call:
> 
> cocoon.sendPage("error.xml", {"error" : "Bold test"});
> 
> just produces this output:
> 
> Bold test
> 
> Looking at the source, I see that the tags have been translated with 
> escape chars:
> 
> Bold test
> 
> 
> For various reasons I don't want the jx generator to translate my  
> tags with escape characters- I want the string above to be treated as 
> html markup. How do I accomplish this?
> 
> Regards,
> Thomas Kjeldahl Nilsson
> Oslo, Norway
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



Re: Should static files be cached serverside?

2004-09-09 Thread Ralph Goers
Gerald Aichholzer said:
> On Thu, 9 Sep 2004 07:34:10 -0700 (PDT), Ralph Goers
>
>
> Well, by clicking on a href="/miracle/app/cook/info.gif" in my
> xhtml-source-code my browser connects to the following address:
>
>http://server:/miracle/app/cook/info.gif
>
> But if I want to serve static content with apache, it should be
>
>http://server:80/miracle/app/cook/info.gif
>
> Do I have to modify my generated xhtml-code to achieve this or
> do I have to edit apache's configuration file only?
>

When done properly your links will be the same as they are.  All incoming
requests go to apache at port 80. Apache forwards the stuff it isn't
handling to the servlet container (in this case at ).  This is an
extremely common configuration (not just for Cocoon). You should search
the Apache http server site for more information.


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



Re: Cocoon 2.0.4 still failing

2004-09-09 Thread Peter Flynn
On Thu, 2004-09-09 at 15:43, Jorg Heymans wrote:
> try "build webapp" as target. 

Same result.

> But how on earth you're getting the 
> instantiationexception i don't know...

Now you know why I'm using 2.0.4 :-)

///Peter



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



Re: handle errors -> send exception to action

2004-09-09 Thread Ralph Goers

Your action will have access to the Throwable. It is in the object model.
Take a look at ObjectModelHelper.

Gunter D'Hondt said:
> Hello,
>
> I want to send an email when an exception occurs and inside the mailbody
> the exception stacktrace must be written. So I thought to make an action
> "action-sendmail" and call it from the map:handle-errors part. That
> definitely triggers the action but how can I send the Exception object (or
> just the errormessage and its stacktrace to that action so I can place it
> into the mailbody.
>
> Can the Exception object been sent thru a parameter? Where is the
> exception located? Inside the request object?
>
> See below a snippet of the sitemap
>
> Any help is welcome,
>


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



Re: Should static files be cached serverside?

2004-09-09 Thread Gerald Aichholzer
On Thu, 9 Sep 2004 07:34:10 -0700 (PDT), Ralph Goers  
<[EMAIL PROTECTED]> wrote:

Gerald Aichholzer said:
On Thu, 09 Sep 2004 12:26:32 +0200, Jorg Heymans <[EMAIL PROTECTED]> wrote:
or you could just let apache serve your static html.
are there any samples doing this? the wiki docs still say "todo".
I'm using cocoon under windows (it's for a prototype only) and
have tried to serve static files (mostly images) with TinyWeb
(which is a very small web server for windows). My application
slowed down by a factor of 3-4.
If apache shows the same behaviour then I don't see any advantages.
You have an apache web server at port 80. The static content is there and
apache serves that up.  Configure apache to proxy the requests for
non-static content to tomcat/jetty for cocoon to process.
Thanx for your answer - unfortunately I don't know much about
configuring apache.
Well, by clicking on a href="/miracle/app/cook/info.gif" in my
xhtml-source-code my browser connects to the following address:
  http://server:/miracle/app/cook/info.gif
But if I want to serve static content with apache, it should be
  http://server:80/miracle/app/cook/info.gif
Do I have to modify my generated xhtml-code to achieve this or
do I have to edit apache's configuration file only?
thanx,
Gerald
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Advantage using Hibernate with Cocoon

2004-09-09 Thread Derek Hohls
Ugo

I hope your talk will be online, for those of us not
lucky enough to make the events?

Thanks
Derek

>>> [EMAIL PROTECTED] 2004/09/09 10:54:49 AM >>>
Il giorno 09/set/04, alle 10:38, [EMAIL PROTECTED] ha scritto:

> I'm wondering what might be the advantage of
> using Hibernate - or another O/R mapper - together
> with Cocoon.

I think there are advantages in using Hibernate to implement data 
persistence over a relational database whether you are using Cocoon or

not. Cocoon's concern is presentation and flow control. Hibernate's 
concern is persistence. The two concerns should not overlap, so that 
you could use a different presentation layer on top of Hibernate or a 
different persistence mechanism beneath Cocoon easily.

We happen to be using Cocoon and Hibernate simply because we believe 
them to be the best tools in their respective fields of application.

> There some articles on the web, about using
> Hibernate with Cocoon.
> And anyone using it?

Articles, not that I know of, but you can find a complete sample here:

. And if you'd like to 
attend either OSCOM4 [1] or GT2004 [2], I'll be presenting a talk on 
Cocoon and Spring which will also cover Hibernate.

Ugo

[1] http://oscom.org/events/oscom4 
[2] http://www.orixo.com/events/gt2004/ 

-- 
Ugo Cei - http://beblogging.com/

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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



Re: Creating and halting flow continuations

2004-09-09 Thread Ulf Sahlin
Hi!

> > It seems it's FOM_Cocoon.suicide(); that halts execution (duh). I tried
> > using this:
> >
> > function testingSome() {
> >
> > var c = cocoon.createWebContinuation();
> > print("Continuation = " + c.id);
> > FOM_Cocoon.suicide();
> > print("Continued executing.");
> > }
>
> This will not work indeed. cocoon.createWebContinuation() will
> create a new
> continuation that will resume directly after the point of
> creation. You could
> try something like this:
>
> function redirectAndWait(uri, ttl) {
>   var cont = new FOM_WebContinuation(new Continuation(),
>  cocoon.continuation, ttl));
>   cocoon.redirectTo(formatUri(uri, cont));
>   FOM_Cocoon.suicide();
> }
>

I don't think I can use this solution, since I need to know the continuation
id beforehand I do the actual redirect (to be used in step 2: "put the id of
the continuation in a deliveryUrl").



> But I don't know where the 'Continuation()' comes from. Before I
> switched to
> my new flow engine I used to create a WebContinuation with
> 'cocoon.createWebContinuation()' and check the request parameters
> to see if
> it's before or after the redirect:
>
> function testingSome(uri) {
>   var c = cocoon.createWebContinuation();
>   print("Continuation = " + c.id);
>   if (cocoon.request.get("afterRedirect") == null) {
> cocoon.redirectTo(uri);
>   } else {
> print("Continued executing.");
>   }
> }
>
> This way you have to make sure the user is redirected to the page with
> 'afterRedirect' set (to 'true' for example). I think this way is less
> elegant, because the excution of the flow continuous after the redirect.

This probably works, I'll look into it.

Regards,
  Ulf Sahlin


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



Re: Advantage using Hibernate with Cocoon

2004-09-09 Thread Derek Hohls
Johannes

I think you hit the nail on the head when you raised the whole
"elephant" thing.  I used the same terminology in a previous
thread. ;-)
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=108799013931354&w=2

A number of folks are pushing OJB... obviously each person
has there own choices, but I would like to see Hibernate 
offered as a serious alternative and one which dovetails well
with Cocoon's approach to life

For myself, being able to use Hibernate in an upcoming project
will be a *significant* advantage - I 'm prepared to bite the
bullet as far as learning  Hibernate's special requirements, as I
have looked through the docs and they seem pretty well written
and comprehensive (esp. c/w Cocoon's scattered docs.)

But, and this is a big BUT, there is very little guidance or samples
on getting Hibernate to work with Cocoon, apart from some very
limited and also outdated ones on the wiki [still, thanks are due
to Hugo who at least went to the effort of publishing something]

I have begged endlessly in previous threads (probably to the
point of really annoying people) about getting together some 
decent (aka "real world") samples and a user guide for doing
this... dare  I ask  - perhaps you are the person to do it??? I 
can offer time to read and test and comment if that will help -
there are others on the list who also have expressed a need 
before - maybe they will step forward as well!

Thanks
Derek

>>> [EMAIL PROTECTED] 2004/09/09 04:18:39 PM >>>
Hi Pat,

I have am now finishing my first project I used Hibernate and Cocoon 
together in,
so maybe you are interested in some thoughts from a beginner's point of

view.

The issue Hibernate addresses is how to get objects to and from the 
database. When
I started to use cocoon, I was impressed by the possibility to separate

design and
logic, using the sitemap and jxt/xslt for presentation and JavaScript 
flow control for
the control layer.

The most natural way to pass data to JX Templates seemed creating 
objects in JavaScript.
So I ended up writing objects - e.g. for articles sold in a web store -

using JavaScript's
weird constructor syntax. The constructors used SQL statements to fetch

the object's
data from a DB. Furthermore I had to define methods "update()" and 
"save()" for each
object to get the data back to the DB. These methods constructed SQL 
statements
containing the respective values.

That was more a PHP-like approach, where you are used to getting and 
storing data using
self-constructed SQL statements.

Now the principal advantage of Hibernate is that it creates a new layer

where all the
persistency stuff is handled. From my point of view, this has the 
following advantages:

- You can use "real" Java to write your business objects, there's no 
more need to use the
awful JavaScript syntax and it has all the obvious benefits like 
supporting interfaces,
inheritance, etc. (Well that's possible without Hibernate too, but 
Hibernate *forces* you
to do this.)

- The flow layer is reduced to what it is supposed to do, controlling 
application flow.
Complicated operations that are to be performed on the business objects

can be implemented
as Java methods. If you are familiar with Javascript, you will probably

agree that it is not
all too well suited for writing large and complex programs, due to the

lack of proper code
structuring facilities. Therefore I think, the thinner the control 
layer, the better.

- It's easier to change the underlying database. When writing native
SQL 
statements, one
often tends to use propietary DB features like, for example, MySQL 
fulltext search (since
it's just so much easier to use than java search engines :-) However, 
this cannot be ported to
Oracle or Informix, for example.

The main drawbacks I see are the following:

- Yet another Elephant you have to eat: The whole concept of
persistency 
is by no means
easy to understand. There's also a lot of hibernate-specific things to

learn, like the mapping
file syntax. Furthermore it's not a Cocoon component so it is 
non-trivial (although not too
complicated either) to integrate (for example have it use the Cocoon 
connection pooling
facilities). Yet I think it pays the price. Personally, it took me
about 
two weeks to understand
the thing and get it to work.

- The hibernate query language, HQL, that you have to use for fetching

objects that match
certain criteria (for fetching just one object there's a cool "load" 
method :-) is another obstacle.
Although it uses SQL-similar syntax whenever that's possible, it's
still 
hard to learn since there's
only the official documentation available that cannot compete with the

millions of articles and
books you can buy about SQL.

- Efficiency: The presence of another layer certainly does not make 
things more efficient. After
all, Hibernate queries and load()s have to be translated to SQL, too. 
But the most important point
seems to me that there are some subtile errors you can make that make 
perform

Re: Cocoon 2.0.4 still failing

2004-09-09 Thread Jorg Heymans
try "build webapp" as target. But how on earth you're getting the 
instantiationexception i don't know...

Peter Flynn wrote:
On Thu, 2004-09-09 at 13:25, Jorg Heymans wrote:

Any particular reason why you decided on an old cocoon version?

Yes, Cocoon 2.1.5.1 won't compile because ant is apparently
being picked up wrongly from FC2, despite what the docs say;
and Tomcat 5.5 has issues running under Java 1.5.0 unless
you start adding patches.
If you're looking to use cocoon professionally, you should seriously 
consider using 2.1.5.1 - the 2.0.x branch is not actively maintained 
anymore (for over a year). Java 1.5 is not yet supported by cocoon so 
don't worry about tomcat just yet.

I've tried and tried, but 2.1.5.1 build.sh simply doesn't work.
I removed the ant distributed with FC2 from RPM, despite the fact that
it's clear from build.sh that it never goes anywhere near it, but uses
the ant distributed with Cocoon 2.1.5.1 instead. Now I get
./build.sh
java.lang.InstantiationException: org.apache.tools.ant.Main
at java.lang.Class.newInstance0(Class.java:293)
at java.lang.Class.newInstance(Class.java:261)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
How do I make 2.1.5.1 build the default target set?

The wiki explanation on the endorsed lib prob is indeed a bit strange. 
Note that if you use Jetty you won't have this problem.

I'd settle for being able to build 2.1.5.1 first.
///Peter

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


Re: Should static files be cached serverside?

2004-09-09 Thread Ralph Goers



Gerald Aichholzer said:
> On Thu, 09 Sep 2004 12:26:32 +0200, Jorg Heymans <[EMAIL PROTECTED]> wrote:
>
>> or you could just let apache serve your static html.
>>
>
> are there any samples doing this? the wiki docs still say "todo".
>
> I'm using cocoon under windows (it's for a prototype only) and
> have tried to serve static files (mostly images) with TinyWeb
> (which is a very small web server for windows). My application
> slowed down by a factor of 3-4.
>
> If apache shows the same behaviour then I don't see any advantages.
>

You have an apache web server at port 80. The static content is there and
apache serves that up.  Configure apache to proxy the requests for
non-static content to tomcat/jetty for cocoon to process.



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



Response code: how can I get it?

2004-09-09 Thread Thierry BARUSTA
Hi!

I'm a newbie regarding the use of Cocoon and I would like to know how I
could test or make a selection on the response code.
I use the WebServiceProxyGenerator and I modified the code for not
leting it to process redirections (status 3XX) itself
(method.setFollowRedirects(false)) and depending on the response status
code I would like to have different behaviour.
It seems to me that it's not possible to do it in the sitemap directly.
Can I use actions to be able test the response code and forward the
modified response to the client? How?
I'm a bit lost in this new environement.

Thank you very much in advance,

/Thierry


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



Re: Creating and halting flow continuations

2004-09-09 Thread Emond Papegaaij
On Thursday 09 September 2004 12:37, Ulf Sahlin wrote:
> > What you need is a 'redirectAndWait'. 
>
> Looking at fom_system.js, the sendPageAndWait method is really a sendPage
> call with some extra stuff, just like you said:
>
> FOM_Cocoon.suicide = new Continuation();
>
> FOM_Cocoon.prototype.sendPageAndWait = function(uri, bizData, fun, ttl) {
> this.sendPage(uri, bizData,
>   new FOM_WebContinuation(new Continuation(),
>   this.continuation, ttl));

> FOM_Cocoon.suicide();
> }
>
> It seems it's FOM_Cocoon.suicide(); that halts execution (duh). I tried
> using this:
>
> function testingSome() {
>
> var c = cocoon.createWebContinuation();
> print("Continuation = " + c.id);
> FOM_Cocoon.suicide();
> print("Continued executing.");
> }

This will not work indeed. cocoon.createWebContinuation() will create a new 
continuation that will resume directly after the point of creation. You could 
try something like this:

function redirectAndWait(uri, ttl) {
  var cont = new FOM_WebContinuation(new Continuation(),
 cocoon.continuation, ttl));
  cocoon.redirectTo(formatUri(uri, cont));
  FOM_Cocoon.suicide();
}

But I don't know where the 'Continuation()' comes from. Before I switched to 
my new flow engine I used to create a WebContinuation with 
'cocoon.createWebContinuation()' and check the request parameters to see if 
it's before or after the redirect:

function testingSome(uri) {
  var c = cocoon.createWebContinuation();
  print("Continuation = " + c.id);
  if (cocoon.request.get("afterRedirect") == null) {
cocoon.redirectTo(uri);
  } else {
print("Continued executing.");
  }
}

This way you have to make sure the user is redirected to the page with 
'afterRedirect' set (to 'true' for example). I think this way is less 
elegant, because the excution of the flow continuous after the redirect.

Emond

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



Re: Advantage using Hibernate with Cocoon

2004-09-09 Thread Johannes Textor
Hi Pat,
I have am now finishing my first project I used Hibernate and Cocoon 
together in,
so maybe you are interested in some thoughts from a beginner's point of 
view.

The issue Hibernate addresses is how to get objects to and from the 
database. When
I started to use cocoon, I was impressed by the possibility to separate 
design and
logic, using the sitemap and jxt/xslt for presentation and JavaScript 
flow control for
the control layer.

The most natural way to pass data to JX Templates seemed creating 
objects in JavaScript.
So I ended up writing objects - e.g. for articles sold in a web store - 
using JavaScript's
weird constructor syntax. The constructors used SQL statements to fetch 
the object's
data from a DB. Furthermore I had to define methods "update()" and 
"save()" for each
object to get the data back to the DB. These methods constructed SQL 
statements
containing the respective values.

That was more a PHP-like approach, where you are used to getting and 
storing data using
self-constructed SQL statements.

Now the principal advantage of Hibernate is that it creates a new layer 
where all the
persistency stuff is handled. From my point of view, this has the 
following advantages:

- You can use "real" Java to write your business objects, there's no 
more need to use the
awful JavaScript syntax and it has all the obvious benefits like 
supporting interfaces,
inheritance, etc. (Well that's possible without Hibernate too, but 
Hibernate *forces* you
to do this.)

- The flow layer is reduced to what it is supposed to do, controlling 
application flow.
Complicated operations that are to be performed on the business objects 
can be implemented
as Java methods. If you are familiar with Javascript, you will probably 
agree that it is not
all too well suited for writing large and complex programs, due to the 
lack of proper code
structuring facilities. Therefore I think, the thinner the control 
layer, the better.

- It's easier to change the underlying database. When writing native SQL 
statements, one
often tends to use propietary DB features like, for example, MySQL 
fulltext search (since
it's just so much easier to use than java search engines :-) However, 
this cannot be ported to
Oracle or Informix, for example.

The main drawbacks I see are the following:
- Yet another Elephant you have to eat: The whole concept of persistency 
is by no means
easy to understand. There's also a lot of hibernate-specific things to 
learn, like the mapping
file syntax. Furthermore it's not a Cocoon component so it is 
non-trivial (although not too
complicated either) to integrate (for example have it use the Cocoon 
connection pooling
facilities). Yet I think it pays the price. Personally, it took me about 
two weeks to understand
the thing and get it to work.

- The hibernate query language, HQL, that you have to use for fetching 
objects that match
certain criteria (for fetching just one object there's a cool "load" 
method :-) is another obstacle.
Although it uses SQL-similar syntax whenever that's possible, it's still 
hard to learn since there's
only the official documentation available that cannot compete with the 
millions of articles and
books you can buy about SQL.

- Efficiency: The presence of another layer certainly does not make 
things more efficient. After
all, Hibernate queries and load()s have to be translated to SQL, too. 
But the most important point
seems to me that there are some subtile errors you can make that make 
performance a nightmare.
For example, I had an article database that also contained other objects 
like stores, images, common
article attributes and the like. For convenience, I implemented a lot of 
two-way associations to make
navigation easier (e.g., I can fetch all the stores for an article and 
all the articles for a store just by
calling a Java getTheThing() method).

Now when querying for ONE article, hibernate per default fetches EVERY 
transitively available
object, since you might do something like

article.getStores().get(5).getArticles().get(3).getStores() 
and wow, now in fact the whole databases is fetched although you only 
wanted one article and
had no plans to navigate to a store !

Of course, this can be turned off, but IMHO it's a typical beginner's 
error :-) Just shows that you
have to think a little more when using Hibernate as opposed to native SQL.

Just my 2 Cents. I would enjoy further discussion.
Greetings,
Johannes
[EMAIL PROTECTED] wrote:
I'm wondering what might be the advantage of
using Hibernate - or another O/R mapper - together
with Cocoon.
There some articles on the web, about using
Hibernate with Cocoon.
And anyone using it?
Pat
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

RE: Custom transformer - ho to get in / out Document from previous ransfromations

2004-09-09 Thread Huber, Daniel
> I am writing a custom transformer that needs to extract
> some fragments from previous transformation steps in the
> running pipeline. Does anyone know how to access, from a
> sitemap component, the input / output to the transform
> method of the transformers that were applied before?

Hi Javier,

You can't access the I/O streams with a transformer directly.
A transformer won't get the complete document from its predecessor
component. It will rather get SAX events. Your component then can
manipulate the data of these events before passing them on to the next
component.

More concrete this means:

Extend the class org.apache.cocoon.transformation.AbstractTransformer
Override the method of the inherited Interface
org.xml.sax.ContentHandler.
Manipulate the incoming data and pass it then to the
super-implementation of AbstractTransformer.

The interface ContentHandler provides methods like startElement(),
endElement(), characters(), which corresponds to the opening tag,
closing tag and text node of an XML element.

For a complete list of available methods, please see
http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html



Regards,

Daniel

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



Re: Cocoon 2.0.4 still failing

2004-09-09 Thread Peter Flynn
On Thu, 2004-09-09 at 13:25, Jorg Heymans wrote:
> > 
> > 
> >>Any particular reason why you decided on an old cocoon version?
> > 
> > 
> > Yes, Cocoon 2.1.5.1 won't compile because ant is apparently
> > being picked up wrongly from FC2, despite what the docs say;
> > and Tomcat 5.5 has issues running under Java 1.5.0 unless
> > you start adding patches.
> 
> If you're looking to use cocoon professionally, you should seriously 
> consider using 2.1.5.1 - the 2.0.x branch is not actively maintained 
> anymore (for over a year). Java 1.5 is not yet supported by cocoon so 
> don't worry about tomcat just yet.

I've tried and tried, but 2.1.5.1 build.sh simply doesn't work.
I removed the ant distributed with FC2 from RPM, despite the fact that
it's clear from build.sh that it never goes anywhere near it, but uses
the ant distributed with Cocoon 2.1.5.1 instead. Now I get

./build.sh
java.lang.InstantiationException: org.apache.tools.ant.Main
at java.lang.Class.newInstance0(Class.java:293)
at java.lang.Class.newInstance(Class.java:261)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)

How do I make 2.1.5.1 build the default target set?

> The wiki explanation on the endorsed lib prob is indeed a bit strange. 
> Note that if you use Jetty you won't have this problem.

I'd settle for being able to build 2.1.5.1 first.

///Peter



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



Re: Should static files be cached serverside?

2004-09-09 Thread Gerald Aichholzer
On Thu, 09 Sep 2004 12:26:32 +0200, Jorg Heymans <[EMAIL PROTECTED]> wrote:
or you could just let apache serve your static html.
are there any samples doing this? the wiki docs still say "todo".
I'm using cocoon under windows (it's for a prototype only) and
have tried to serve static files (mostly images) with TinyWeb
(which is a very small web server for windows). My application
slowed down by a factor of 3-4.
If apache shows the same behaviour then I don't see any advantages.
BTW: cocoon 2.1.5.1. with jetty
thanx for any tips,
Gerald

Kees van Dieren wrote:
Hello,
 I'm researching caching and performance in Cocoon. Should static files  
(html, css, js, gif/jpeg/png) be excluded from a pipeline with  the  
type set to 'caching'?
 I think that they should not be cached serverside, because the  
filename is used to generate they key; the caching-key is longer to  
read  then the filename itself. Conclusion: enabling pipeline-caching  
for  static files, decreases the performance. Is this true, or is  
cocoon able to detect that files are static, and thus there is no  
requirement to cache them?
 Resource for caching:  
http://cocoon.apache.org/2.1/userdocs/concepts/caching.html
 Regards,
 Kees van Dieren
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Custom transformer - ho to get in / out Document from previous ransfromations

2004-09-09 Thread Javier Ramos



Hi all,
 
    I am writing a custom 
transformer that needs to extract some fragments from previous transformation 
steps in the running pipeline. Does anyone know how to access, from a sitemap 
component, the input / output to the transform method of the transformers that 
were applied before?
 
Thanks for any replies,
 
Javier


loading user profiles from mysql

2004-09-09 Thread Anton Andreev
Hello,

I am running Cocoon 2.1.5 with Tomcat 5.0.19.  I'm
trying to load profiles for users from mysql (ver:
4.1.4-gamma-Max) rather then from filesystem (original
setup on cocoon).  So i've changed "load-user-profile"
 pipeline in portal/. to:


















instead of what is commented out.  I've checked the
pipeline and it returns exact xml just like in portal
xml files in profiles for user = "anonymous" and
profile = "copletinstancedata | layout".  In portal
sitemap it does not whant to work though.  The error
that i'm getting is: 
org.apache.cocoon.ProcessingException: Failed to
execute pipeline.:
org.apache.avalon.framework.CascadingRuntimeException:
Exception during loading of profile.

cause: org.xml.sax.SAXException: Parsing Error :
Premature end of file. Line : -1 Column : -1 {file:
[not available]; line: [not available]; column: [not
available]}

...although the xml it's getting is the same as in
profiles folders...  I would appreciate any
suggestions or new ideas...  Thank you...

Regards,

Anton Andreev

__ 
Post your free ad now! http://personals.yahoo.ca

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



Re: Cocoon 2.0.4 still failing

2004-09-09 Thread Jorg Heymans

Any particular reason why you decided on an old cocoon version?

Yes, Cocoon 2.1.5.1 won't compile because ant is apparently
being picked up wrongly from FC2, despite what the docs say;
and Tomcat 5.5 has issues running under Java 1.5.0 unless
you start adding patches.
If you're looking to use cocoon professionally, you should seriously 
consider using 2.1.5.1 - the 2.0.x branch is not actively maintained 
anymore (for over a year). Java 1.5 is not yet supported by cocoon so 
don't worry about tomcat just yet.

The wiki explanation on the endorsed lib prob is indeed a bit strange. 
Note that if you use Jetty you won't have this problem.

Regards
Jorg

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


RE: Advantage using Hibernate with Cocoon

2004-09-09 Thread Paul Joseph
Also, try out Devaki NextOjbects an opensource tool
that has Torque built it.

http://www.devaki.org/nextobjects/

It automagically generates all the supporting OJB
related files needed including the SQL calls to create
the database.

thx
Paul
--- Jeroen Reijn <[EMAIL PROTECTED]> wrote:

> Pat,
> 
> I have not used hibernate with cocoon yet, but i
> have used Cocoon Forms with OJB/JDO.
> There are some wikipages about hibernate with Cocoon
> and OJB with Cocoon.
> 
> Some samples about OJB and Forms can be found in the
> cocoon distribution.
> 
> Looking at the wiki:
> 
> http://wiki.apache.org/cocoon/CformsHibernateAndFlow
> 
> http://wiki.apache.org/cocoon/OJBWithJDO
> 
> http://wiki.apache.org/cocoon/NewbieGuideToOJB2
> 
> Hope this helps a bit.
> 
> Jeroen
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Posted At: Thursday, September 09, 2004 10:39 AM
> Posted To: Cocoon User List
> Conversation: Advantage using Hibernate with Cocoon
> Subject: Advantage using Hibernate with Cocoon
> 
> 
> I'm wondering what might be the advantage of
> using Hibernate - or another O/R mapper - together
> with Cocoon.
> There some articles on the web, about using
> Hibernate with Cocoon.
> And anyone using it? 
> 
> Pat
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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



Re: Cocoon 2.0.4 still failing

2004-09-09 Thread Peter Flynn
On Thu, 2004-09-09 at 11:48, Jorg Heymans wrote:
> did you check the endorsed lib problem? Search the wiki for a howto.

That seems to work, after a bit of experimenting. Thanks very much.

For the record, with Tomcat 4.1.30 and Cocoon 2.0.4 with Java 1.4.2_05 
under FC2 you need to copy xalan-2.3.1.jar (only) from 
/opt/tomcat/jakarta-tomcat-4.1.30/webapps/cocoon/WEB-INF/lib (where it 
was put when Tomcat expanded cocoon.war) to
/opt/tomcat/jakarta-tomcat-4.1.30/common/endorsed

Copying xalan-2.3.1.jar to /usr/java/j2sdk1.4.2_05/jre/lib/endorsed
as suggested in the Wiki does *not* work.

Copying xercesImpl-2.0.0.jar in the same manner seems to be unnecessary,
as /opt/tomcat/jakarta-tomcat-4.1.30/common/endorsed already has a file
xercesImpl.jar. I have not tried removing this and replaing it with the
2.0.0 file.

The Wiki EndorsedLibsProblem is immutable, so I'll leave
it to someone else to update.

///Peter



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



RE: Host selector causing problem with PDF serialiser - Email has different SMTP TO: and MIME TO: fields in the email addresses

2004-09-09 Thread Neil Rudd
The host selector mounts a folder located on a different logical disk,
as shown in the code snippet below.












 

It does seem to more of an IE problem as I can access the PDF from both
Netscape and Opera. Anyone got any ideas what could be causing this?



-Original Message-
From: Upayavira [mailto:[EMAIL PROTECTED] 
Sent: 09 September 2004 10:17
To: [EMAIL PROTECTED]
Subject: Re: Host selector causing problem with PDF serialiser - Email
has different SMTP TO: and MIME TO: fields in the email addresses

David Merrilees wrote:

>I have a transformation serialising an xml file as a PDF which works 
>fine until I use a host selector within the pipeline and it fails to 
>open. The host selector is working correctly except for this problem.
>
>See the problem for yourself here:
>http://www.neilrudd.co.uk/cocoon/abc/index.pdf
>
>Anyone else encountered this?
>  
>
Works in FireFox but not in IE. Can you post sitemap snippets that work
and don't work? Seems like a mime-type problem to me.

Regards, Upayavira

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




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



Re: Cocoon 2.0.4 still failing

2004-09-09 Thread Peter Flynn
On Thu, 2004-09-09 at 11:48, Jorg Heymans wrote:
> did you check the endorsed lib problem? Search the wiki for a howto.

Hah! That definitely looks like it.

Unfortunately, the Wiki page doesn't say *what* files need
to be copied to the endorsed directory: it just says "the
libraries"; and it refers to a jre/lib/endorsed directory
which doesn't exist in my /usr/java/j2sdk1.4.2_05 directory
(do I create it?).

> Any particular reason why you decided on an old cocoon version?

Yes, Cocoon 2.1.5.1 won't compile because ant is apparently
being picked up wrongly from FC2, despite what the docs say;
and Tomcat 5.5 has issues running under Java 1.5.0 unless
you start adding patches.

///Peter



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



Re: Orbeon Presentation Server - OXF Rebuttal needed again?

2004-09-09 Thread Damon Rand
Why the bitterness? Competition is a good thing. Personally I am happy
that OXF has been opensourced. It is a good solid product and its main
weakness was not being opensource.

Having used both OXF and Cocoon on several projects they are both good
and both different. I believe OXF started out from Norman Walsh's
pipeline definition.
http://www.w3.org/TR/2002/NOTE-xml-pipeline-20020228/ 

The result is the almost complete eradication of java in the
presentation tier which is either a good or a bad thing depending on
your perspective. But the way I see it, it just means more choice for
web developers.

In some ways I find OXF is more like Struts than Cocoon -- I see it as
a way to bring my Struts colleagues across to XSLT pipelining rather
than as a replacement for Cocoon.

Looking through the comparison I cant find anything that is actually
untrue? I'm sure if there is anything specific then the Orbeon guys
will change it.

Damon.



> > but I was just wondering if any of the Cocoon developers are interested
> > in taking a look at the current state of the comparison between their
> > Presentation Server and Cocoon and maybe come up with more accurate
> > descriptions of cocoons capabilities?
> 
> Bah. I've seen that they changed it again: whenever they had to
> recognize that Cocoon had the very same (if not better) capabilities,
> they used the "limited" keyword. I see no way and no reason for them
> to come out with an accurate comparison, and their open sourcing seems
> to me the typical last resort they could think of. I would rather let
> them die the painful death they deserve.
>

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



Re: Cocoon 2.0.4 still failing

2004-09-09 Thread Jorg Heymans
did you check the endorsed lib problem? Search the wiki for a howto.
Any particular reason why you decided on an old cocoon version?
Peter Flynn wrote:
My newly-installed http://localhost/cocoon (Tomcat 4.1.30
and Cocoon 2.0.4 under Java 1.4.2_05 on FC2) still fails 
with


Cocoon 2 - Internal server error
type fatal
message Failed to generate program code (this may happen if 
 you use Xalan in incremental processing mode).
 Please check log file and/or console for errors.
description org.apache.cocoon.ProcessingException: Failed to
  generate program code (this may happen if you use
  Xalan in incremental processing mode). Please
  check log file and/or console for errors.
sender org.apache.cocoon.servlet.CocoonServlet

The error.log file says 


ERROR   (2004-09-09) 11:27.09:378   [sitemap] (/cocoon/)
http80-Processor3/Handler: Error compiling sitemap
org.apache.cocoon.ProcessingException: Failed to generate program code
(this may happen if you use Xalan in incremental processing mode).
Please check log file and/or console for errors.

and

ERROR   (2004-09-09) 11:27.09:380   [access] (/cocoon/)
http80-Processor3/CocoonServlet: Problem with Cocoon servlet

Can anyone shed any light on why this should be happening
with a virgin installation?
///Peter

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


Cocoon 2.0.4 still failing

2004-09-09 Thread Peter Flynn
My newly-installed http://localhost/cocoon (Tomcat 4.1.30
and Cocoon 2.0.4 under Java 1.4.2_05 on FC2) still fails 
with

> Cocoon 2 - Internal server error
> type fatal
> message Failed to generate program code (this may happen if 
>   you use Xalan in incremental processing mode).
>   Please check log file and/or console for errors.
> description org.apache.cocoon.ProcessingException: Failed to
>generate program code (this may happen if you use
>Xalan in incremental processing mode). Please
>check log file and/or console for errors.
> sender org.apache.cocoon.servlet.CocoonServlet

The error.log file says 

> ERROR   (2004-09-09) 11:27.09:378   [sitemap] (/cocoon/)
> http80-Processor3/Handler: Error compiling sitemap
> org.apache.cocoon.ProcessingException: Failed to generate program code
> (this may happen if you use Xalan in incremental processing mode).
> Please check log file and/or console for errors.

and

> ERROR   (2004-09-09) 11:27.09:380   [access] (/cocoon/)
> http80-Processor3/CocoonServlet: Problem with Cocoon servlet

Can anyone shed any light on why this should be happening
with a virgin installation?

///Peter



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



Re: Creating and halting flow continuations

2004-09-09 Thread Ulf Sahlin

Hello Emond! Thank your for your swift reply.

> > I need to:
> >
> > 1. create a continuation
> > 2. put the id of the continuation in a deliveryUrl
> > 3. redirect to a redirectUrl
> > 4. suspend flowscript execution, until the remote system hosting
> > redirectUrl redirects the user to my deliveryUrl
> > 5. resume from here (by sitemap-catching the deliveryUrl
> continuation id,
> > continuing the flowscript execution)
> >
> >
> > Is this possible? I tried to read
> > http://cocoon.apache.org/2.1/userdocs/flow/api.html on how creating
> > WebContinuations manually affect execution, but it doesn't say
> how and if I
> > could halt execution.
>
> What you need is a 'redirectAndWait'. This is something that IMHO
> is missing
> in the current flow API, but very easy to implement. I don't have
> the cocoon
> source here at the moment, but take a look at the
> 'sendPageAndWait' method in
> the flow implementation you are using (probably javascript). This method
> should call 'sendPage' and some other stuff. The
> 'redirectAndWait' method you
> need will contain a 'redirect' (or is it 'redirectTo'?) and this
> other stuff.
> That's all you need.
>
> A custom flow engine I'm working on as an example:
>public void sendPageAndWait(String uri, Object bizdata) {
>  sendPage(uri, bizdata);
>  getCont().endExecution(null);
>}
>
>public void redirectAndWait(String uri) {
>  redirectTo(uri);
>  getCont().endExecution(null);
>}
>
> Good luck,
> Emond

Looking at
cocoon\build\cocoon-2.1.5.1\classes\org\apache\cocoon\components\flow\javasc
ript\fom\fom_system.js, the sendPageAndWait method is really a sendPage call
with some extra stuff, just like you said:

FOM_Cocoon.suicide = new Continuation();

FOM_Cocoon.prototype.sendPageAndWait = function(uri, bizData, fun, ttl) {
this.sendPage(uri, bizData,
  new FOM_WebContinuation(new Continuation(),
  this.continuation, ttl));
if (fun) {
if (!(fun instanceof Function)) {
throw "Expected a function instead of: " + fun;
}
fun();
}
FOM_Cocoon.suicide();
}

It seems it's FOM_Cocoon.suicide(); that halts execution (duh). I tried
using this:

function testingSome() {

var c = cocoon.createWebContinuation();
print("Continuation = " + c.id);
FOM_Cocoon.suicide();
print("Continued executing.");
}

When I call this test method, it displays a continuation id and then halts.
When I call the continuation using the print'ed continuation id to resume
execution, it seems it's picking up execution right after the
createWebContinuation() call, which means it only prints the "Continuation =
" again and then executes suicide - whereas I wanted it to pick up right
after its suicide line and print the "Continued executing." part.

I guess I'm supposed to use this in some other way, but I'm not that
familiar with flowscript. What am I doing wrong?

regards,
  Ulf Sahlin


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



Re: Should static files be cached serverside?

2004-09-09 Thread Jorg Heymans
or you could just let apache serve your static html.
Kees van Dieren wrote:
Hello,
I'm researching caching and performance in Cocoon. Should static files 
(html, css, js, gif/jpeg/png) be excluded from a pipeline with  the type 
set to 'caching'?

I think that they should not be cached serverside, because the filename 
is used to generate they key; the caching-key is longer to read  then 
the filename itself. Conclusion: enabling pipeline-caching for  static 
files, decreases the performance. Is this true, or is cocoon able to 
detect that files are static, and thus there is no requirement to cache 
them?

Resource for caching: 
http://cocoon.apache.org/2.1/userdocs/concepts/caching.html

Regards,
Kees van Dieren

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


Cocoon Proxy & Redirects

2004-09-09 Thread Thierry BARUSTA
Hi!

I'm curently using the WebServiceProxyGenerator provided with Cocoon
2.1.5. I have an issue when receiving a 3xx response code. The redirect
is processed by Jakarta Commons - HttpClient and it works fine. The
problem is that the url in the client's browser doesn't change (which is
normal because it doesn't see the redirect) and the different request
variables (contextPath, requestURI...) are set with the first request
values. I need therefore to let the browser taking care of the redirect
itself with a "proxied" location.

I'm quite new to Cocoon and I don't know how to perform that:
-by selecting on http response code and forward it to the client browser
with a proxied location url, is that possible?
-by modifying the WebServiceProxyGenerator code?
-by other better ways?
 
This might be a bug in cocoon's proxy block. Thank you very much in
advance.
Any help appreciated!

/Thierry BARUSTA


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



Should static files be cached serverside?

2004-09-09 Thread Kees van Dieren
Hello,
I'm researching caching and performance in Cocoon. Should static files 
(html, css, js, gif/jpeg/png) be excluded from a pipeline with  the type 
set to 'caching'?

I think that they should not be cached serverside, because the filename 
is used to generate they key; the caching-key is longer to read  then 
the filename itself. Conclusion: enabling pipeline-caching for  static 
files, decreases the performance. Is this true, or is cocoon able to 
detect that files are static, and thus there is no requirement to cache 
them?

Resource for caching: 
http://cocoon.apache.org/2.1/userdocs/concepts/caching.html

Regards,
Kees van Dieren
--
Kees van Dieren
Bram Groenewegeweg 8
4693 PP Poortvliet
T: 0166-617132
M: 06-43068619
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Cocoon Error

2004-09-09 Thread Norman Barker
Jyothi Giridhar wrote:
Hi ,
I installed Apache TOmcat 4.1.18 
I copied the cocoon.war file from cocoon2.0.4 .
When i try 
http://localhost:8080  - > Th tomcat page comes up
bug when i try 
http://localhost:8080/cocoon -> I get this error

Failed to generate program code (this may happen if
you use Xalan in incremental processing mode). Please
check log file and/or console for errors.
Please help me. 

Regards
Asha 

		
__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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

Update the XML libraries in JAVA_HOME\lib\endorsed (or whereever they 
are) with the ones
from Cocoon solves this.

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


Cocoon Error

2004-09-09 Thread Jyothi Giridhar
Hi ,

I installed Apache TOmcat 4.1.18 
I copied the cocoon.war file from cocoon2.0.4 .
When i try 
http://localhost:8080  - > Th tomcat page comes up
bug when i try 
http://localhost:8080/cocoon -> I get this error

Failed to generate program code (this may happen if
you use Xalan in incremental processing mode). Please
check log file and/or console for errors.

Please help me. 

Regards
Asha 



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: cocoon 2.1.5.1 and tomcat 5.5, library conflict

2004-09-09 Thread Niko Popitsch
Hi,
I still could not solve this problem, but I found out that it _is_ a 
conflict between the commons-logging-api.jar in the tomcat/bin directory 
and the commons-logging-1.0.3.jar of my application.
But how to get around this conflict? the libraries in tomcat/bin are 
loaded by the tomcat system classloader (because they are used in the 
startup routines of tomcat, I presume).
My webapp is loaded by the WebappClassLoader (see the debug output below)...

Unsing the endorsement mechanism for overriding the 
commons-logging-api.jar does not work (a missing constructor...).
I also tried commons-logging-api-1.0.4.jar - same thing.

anyone?
regards,
niko
= classloader toString() ===
  delegate: false
  repositories:
/WEB-INF/classes/
--> Parent Classloader:
StandardClassLoader
  delegate: true
  repositories:
file:/srv/jakarta-tomcat-5.0.27/shared/classes/
--> Parent Classloader:
StandardClassLoader
  delegate: true
  repositories:
file:/srv/jakarta-tomcat-5.0.27/common/classes/
file:/srv/jakarta-tomcat-5.0.27/common/endorsed/xercesImpl.jar
file:/srv/jakarta-tomcat-5.0.27/common/endorsed/xml-apis.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/ant-launcher.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/ant.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/commons-collections-2.1.1.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/commons-dbcp-1.2.1.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/commons-el.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/commons-pool-1.2.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/jasper-compiler.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/jasper-runtime.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/jsp-api.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/naming-common.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/naming-factory.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/naming-java.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/naming-resources.jar
file:/srv/jakarta-tomcat-5.0.27/common/lib/servlet-api.jar
--> Parent Classloader:
[EMAIL PROTECTED]

Niko Popitsch wrote:
Hi,
I am developing a cocoon application that I want to run in a tomcat 5.x 
container (currently trying out the latest 5.5 release).
my cocoon application starts fine, but I have a lot of
LogConfigurationExceptions in my catalina.out log and all other tomcat 
contexts do not work any more. I think this is a conflict between the 
commons-logging-api.jar of tomcat and the commons-logging-1.0.3.jar of 
my cocoon application (right?).
How can I avoid this conflict? I tried the following withou success:

- replace the tomcat lib by the cocoon lib
- replace the cocoon lib by the tomcat lib
- use the ParanoidCocoonServlet to load my app
(I've moved the commons-logging-1.0.3.jar
from the WEB_INF/lib directory for this test)
can somebody help??
thanks,
best regards,
niko

Sep 7, 2004 2:52:44 PM org.apache.catalina.startup.ContextConfig 
processDefaultWebConfig
SEVERE: Parse error in default web.xml
org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException: java.lang.ClassN
otFoundException: org.apache.commons.logging.impl.LogKitLogger (Caused 
by java.lang.ClassNotFoundException: org.apache.commo
ns.logging.impl.LogKitLogger) (Caused by 
org.apache.commons.logging.LogConfigurationException: 
java.lang.ClassNotFoundExcept
ion: org.apache.commons.logging.impl.LogKitLogger (Caused by 
java.lang.ClassNotFoundException: org.apache.commons.logging.im
pl.LogKitLogger))
at 
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2740) 

at 
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2766) 

at 
org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1060)
at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)
at 
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at 
org.apache.catalina.startup.ContextConfig.processDefaultWebConfig(ContextConfig.java:559) 

at 
org.apache.catalina.startup.ContextConfig.defaultWebConfig(ContextConfig.java:509) 

at 
org.apache.catalina.startup.Conte

handle errors -> send exception to action

2004-09-09 Thread Gunter D'Hondt

Hello,

I want to send an email when an exception
occurs and inside the mailbody the exception stacktrace must be written.
So I thought to make an action "action-sendmail" and call it
from the map:handle-errors part. That definitely triggers the action but
how can I send the Exception object (or just the errormessage and its stacktrace
to that action so I can place it into the mailbody.

Can the Exception object been sent thru
a parameter? Where is the exception located? Inside the request object?

See below a snippet of the sitemap

Any help is welcome,

Regards,
Gunter D'Hondt
SOFICO NV Belgium.


    
      
        
          
          
           

           

          
          
        

        
          
          
           

          
          
        

        
          
          
          
          
        
      

    

RE: Data access to/from JXTemplate

2004-09-09 Thread Derek Hohls
Jeroen

Yes, I also thought it *should* work -
I am using Cocoon 2.1.5.

I will use your sample and see if I can figure it.

Thanks for trying!
Derek

>>> [EMAIL PROTECTED] 2004/09/09 10:23:02 AM >>>
Derek,

regarding the second issue.

I have tested the situation with the sitemap matcher:


  
   

  
 

Code in the jx template:




The result is:





So it should be correct. What version of cocoon are you using?

Jeroen


-Original Message-
From: Derek Hohls [mailto:[EMAIL PROTECTED] 
Posted At: Thursday, September 09, 2004 8:41 AM
Posted To: Cocoon User List
Conversation: Data access to/from JXTemplate
Subject: Data access to/from JXTemplate


Hi

There have been two recent posts on this topic, both unanswered
and both, I think!, quite simple questions:
http://archives.real-time.com/pipermail/cocoon-users/2004-September/055826.html


http://archives.real-time.com/pipermail/cocoon-users/2004-September/055837.html



If anyone has a few moments to address it, I would really appreciate
it as I am sure JXTemplate can do what I need to, but I if I cannot 
get answers to the above quite soon I will have to adopt some really
clunky way of solving things...

Thanks
Derek


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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


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


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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



Re: Host selector causing problem with PDF serialiser

2004-09-09 Thread Upayavira
David Merrilees wrote:
I have a transformation serialising an xml file as a PDF which works
fine until I use a host selector within the pipeline and it fails to
open. The host selector is working correctly except for this problem.
See the problem for yourself here:
http://www.neilrudd.co.uk/cocoon/abc/index.pdf
Anyone else encountered this?
 

Works in FireFox but not in IE. Can you post sitemap snippets that work 
and don't work? Seems like a mime-type problem to me.

Regards, Upayavira
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Host selector causing problem with PDF serialiser

2004-09-09 Thread Jean-Claude Moissinac
David Merrilees wrote:
I have a transformation serialising an xml file as a PDF which works
fine until I use a host selector within the pipeline and it fails to
open. The host selector is working correctly except for this problem.
See the problem for yourself here:
http://www.neilrudd.co.uk/cocoon/abc/index.pdf
Anyone else encountered this?
David Merrilees


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

I encounter no problem to open the PDF at this URL
--
Jean-Claude Moissinac
Department of Computer Science and Networks
ENST Paris
FRANCE
E-mail: [EMAIL PROTECTED]
Tel: (+33) 1.45.81.80.88
Fax: (+33) 1.45.81.71.58
http://shadok.enst.fr/jcm
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Host selector causing problem with PDF serialiser

2004-09-09 Thread [EMAIL PROTECTED]
David Merrilees wrote:
I have a transformation serialising an xml file as a PDF which works
fine until I use a host selector within the pipeline and it fails to
open. The host selector is working correctly except for this problem.
See the problem for yourself here:
http://www.neilrudd.co.uk/cocoon/abc/index.pdf
Anyone else encountered this?
WFM and opens as "application/pdf".
--
Volkmar W. Pogatzki
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Advantage using Hibernate with Cocoon

2004-09-09 Thread Ugo Cei
Il giorno 09/set/04, alle 10:38, [EMAIL PROTECTED] ha scritto:
I'm wondering what might be the advantage of
using Hibernate - or another O/R mapper - together
with Cocoon.
I think there are advantages in using Hibernate to implement data 
persistence over a relational database whether you are using Cocoon or 
not. Cocoon's concern is presentation and flow control. Hibernate's 
concern is persistence. The two concerns should not overlap, so that 
you could use a different presentation layer on top of Hibernate or a 
different persistence mechanism beneath Cocoon easily.

We happen to be using Cocoon and Hibernate simply because we believe 
them to be the best tools in their respective fields of application.

There some articles on the web, about using
Hibernate with Cocoon.
And anyone using it?
Articles, not that I know of, but you can find a complete sample here: 
. And if you'd like to 
attend either OSCOM4 [1] or GT2004 [2], I'll be presenting a talk on 
Cocoon and Spring which will also cover Hibernate.

Ugo
[1] http://oscom.org/events/oscom4
[2] http://www.orixo.com/events/gt2004/
--
Ugo Cei - http://beblogging.com/


smime.p7s
Description: S/MIME cryptographic signature


RE: Problem dealing with & ampersand - HELP

2004-09-09 Thread Philip . Fennell
Hello,

> I cannot possibly put in some entity reference because the href is
user input driven

If the href is user input driven then you have two choices:

1) Upon submitting the form, that sends the user input, use the onSubmit
event to trigger some client-side scripting that converts troublesome
characters in the URL into HTTP encodings e.g. (& = %26)

2) If the output of your JSP page is generating some markup that is then
being processed by a cocoon pipeline, do something similar in your JSP.



Hope this helps.



Regards

Phil Fennell


-Original Message-
From: kranga [mailto:[EMAIL PROTECTED] 
Sent: 08 September 2004 19:54
To: [EMAIL PROTECTED]
Subject: Problem dealing with & ampersand - HELP

I have a jsp page that produces a href element that has some query
parameters. Unfortunately the cocoon pipeline throws an error:

 org.apache.cocoon.ProcessingException: SAXException while parsing
JSPEngine
output: null:102:135:org.xml.sax.SAXParseException: The reference to
entity "subsect" must end with the ';' delimiter.

The href element has a URL of the form xyz.com?test=1&subsect=go

How do I get around this? I cannot possibly put in some entity reference
because the href is user input driven.

Thanks
K


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

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



Host selector causing problem with PDF serialiser

2004-09-09 Thread David Merrilees
I have a transformation serialising an xml file as a PDF which works
fine until I use a host selector within the pipeline and it fails to
open. The host selector is working correctly except for this problem.

See the problem for yourself here:
http://www.neilrudd.co.uk/cocoon/abc/index.pdf

Anyone else encountered this?

David Merrilees





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



RE: Advantage using Hibernate with Cocoon

2004-09-09 Thread Jeroen Reijn
Pat,

I have not used hibernate with cocoon yet, but i have used Cocoon Forms with OJB/JDO.
There are some wikipages about hibernate with Cocoon and OJB with Cocoon.

Some samples about OJB and Forms can be found in the cocoon distribution.

Looking at the wiki:

http://wiki.apache.org/cocoon/CformsHibernateAndFlow

http://wiki.apache.org/cocoon/OJBWithJDO

http://wiki.apache.org/cocoon/NewbieGuideToOJB2

Hope this helps a bit.

Jeroen



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Posted At: Thursday, September 09, 2004 10:39 AM
Posted To: Cocoon User List
Conversation: Advantage using Hibernate with Cocoon
Subject: Advantage using Hibernate with Cocoon


I'm wondering what might be the advantage of
using Hibernate - or another O/R mapper - together
with Cocoon.
There some articles on the web, about using
Hibernate with Cocoon.
And anyone using it? 

Pat

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



Advantage using Hibernate with Cocoon

2004-09-09 Thread patrick
I'm wondering what might be the advantage of
using Hibernate - or another O/R mapper - together
with Cocoon.
There some articles on the web, about using
Hibernate with Cocoon.
And anyone using it? 

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


Modifying documents via flowscript...

2004-09-09 Thread Derek Hohls
I am using flowscript to handle the process around 
modifying a form - so far so good!  Now I would like
to be able - from flowscript, I suppose - to modify the
just-saved form in some way, probably by appending
a comment line to the end (say with a time and date
stamp, and an user id).  Is there a straightforward 
way of doing this?

Thanks
Derek

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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



Can you take the output of a transformation and use it as a param eter within the context of the matcher???

2004-09-09 Thread Philip . Fennell
Wasn't sure how to word the subject but what follows is what I'd like to
know...

I have a pipeline that contains a matcher the uses the parameter
(relativePath) from the request as the url of a redirect:



  
  
  

  
  http://localhost:8080/cocoon/RIU/{relativePath}"/>

  
  



What I'd also like to do is take the result of a transformation, in this
case a url and use it as a parameter (relativePathFromOtherTransform) in
a redirect as above:



  
  
  

http://localhost:8080/cocoon/RIU/{relativePathFromOtherTransform}"/
>

  
  



The only thing here is, how do I get my hands on the serialized (text)
output of a transformation either from within this matcher or from some
other matcher and use it as a parameter.


Could this be done or am I just mad as bag of snakes???


Regards

Phil Fennell

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



RE: Data access to/from JXTemplate

2004-09-09 Thread Jeroen Reijn
Derek,

regarding the second issue.

I have tested the situation with the sitemap matcher:


  
   

  
 

Code in the jx template:




The result is:





So it should be correct. What version of cocoon are you using?

Jeroen


-Original Message-
From: Derek Hohls [mailto:[EMAIL PROTECTED]
Posted At: Thursday, September 09, 2004 8:41 AM
Posted To: Cocoon User List
Conversation: Data access to/from JXTemplate
Subject: Data access to/from JXTemplate


Hi

There have been two recent posts on this topic, both unanswered
and both, I think!, quite simple questions:
http://archives.real-time.com/pipermail/cocoon-users/2004-September/055826.html

http://archives.real-time.com/pipermail/cocoon-users/2004-September/055837.html


If anyone has a few moments to address it, I would really appreciate
it as I am sure JXTemplate can do what I need to, but I if I cannot 
get answers to the above quite soon I will have to adopt some really
clunky way of solving things...

Thanks
Derek


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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


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



Re: CForm bind JXPathContext

2004-09-09 Thread Marc Portier

oceatoon wrote:
Hi Marc
my Cform is binded to an XML document,
This is the part we are concirned with :


 


..etc 

 
 



 


***
 

 
 

if(widget.getValue() != null){
var roomid = jxpathContext.parentContext.getValue("../../@id");
var formValue =
"/room"+roomid+"/"+widget.getValue().getHeaders().get("filename");
jxpathPointer.setValue(formValue); }

As you can see my @path should be relative to the room it is in
So on bind I would like to retreive the id of the room it is in ;)
but I cant go back further than  which is the parentContext on the
JXPathContext, var roomid = jxpathContext.getValue("../../@id") doesn't
work , neither does the one above ??? 

hm, I'm only assuming that the pathContext used above does the same as 
an additional ../ in front of the path, so the equivalent should have been:

var roomid = jxpathContext.getValue("../../../@id")
is this possible or do I really have to do a post bind transformation ??
I'm sure there's a way to XPoint at the whole binded document??
there is no immidiate reason I can think off why this shouldn't work, 
close up testing should yield more hinting messages..

just to make sure I made some tests based on the form2 sample included 
with the cocoon distro

see:
http://cvs.apache.org/viewcvs.cgi/cocoon/trunk/src/blocks/forms/samples/forms/form2_bind_xml.xml?rev=30942&root=Apache-SVN&view=auto
inserting at line 101 something like this:
  var testValue = 
jxpathContext.getValue("../../../info/email/@boolBindingWorks");
  print("xpath-test 1 returns: " + testValue);
  testValue = jxpathContext.getValue("//email/@boolBindingWorks");
  print("xpath-test 2 returns: " + testValue);
  testValue = 
jxpathContext.getValue("ancestor::context/info/email/@boolBindingWorks");
  print("xpath-test 3 returns: " + testValue);

just works for me, I know it's slightly different to what you do, but 
this shows there is no navigation limitation to the xpath expressions.

a slower xpath search that removes the need to get the number of keading 
../ levels correct for testing could be 
jxpathContext.getValue("anscestor::room/@id")

HTH,
-marc=
--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog athttp://blogs.cocoondev.org/mpo/
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]