Re: Using htmlArea 'output' with SVG

2004-11-23 Thread Ugo Cei
Il giorno 23/nov/04, alle 07:31, Derek Hohls ha scritto:
Thanks; are there any example demo'ing how this
approach can be integrated into Cocoon... I'm afraid
this hint is less than obvious to me, especially as it
seem htmlArea is not producing tags at all...
The simple class attached will take in a String as produced by 
HTMLArea, parse it using Neko and return a DOM. You must of course have 
the Neko parser on your classpath.

Ugo
/*
 * $Id: HTMLParser.java,v 1.2 2004/02/25 15:47:39 ugo Exp $
 */

import java.io.IOException;
import java.io.StringReader;

import org.apache.xerces.parsers.DOMParser;
import org.cyberneko.html.HTMLConfiguration;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

/**
 * Description of HTMLParser.
 */
public class HTMLParser {
private static final String xmlProlog = ?xml;

private static DOMParser parser;

static {
HTMLConfiguration parserconf = new HTMLConfiguration();

parserconf.setProperty(http://cyberneko.org/html/properties/names/elems;, 
lower);

parserconf.setProperty(http://cyberneko.org/html/properties/names/attrs;, 
lower);

parserconf.setProperty(http://cyberneko.org/html/properties/default-encoding;, 
ISO-8859-1);
parser = new DOMParser(parserconf);
}

private HTMLParser() {
}

public static synchronized Document parse(String input) throws 
SAXException, IOException {
if (input.startsWith(xmlProlog)) {
int pos = input.indexOf('');
if (pos  0) {
input = input.substring(pos + 1);
}
else {
// TODO: log this
return null;
}
}
InputSource is = new InputSource(new StringReader(input));
parser.parse(is);
return parser.getDocument();
}
}

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


smime.p7s
Description: S/MIME cryptographic signature


Memory usage

2004-11-23 Thread Jan Hoskens
Hi,
I'm working with cocoon 2.1.5. Yesterday I had some problems rendering a 
pdf (fop). As I had some trouble before with memory usage, I know that 
I'll have to check the size of the memory again. But I didn't have any 
problems rendering pdf before. Now today I just restarted the tomcat and 
tried again. This time no problems with pdf rendering. So here's the 
question part:

- if the webapp is running for a longer period of time, will this affect 
memory usage a lot?
- I'm using fop to generate pdf, I already buillt in some mechanism to 
chop the larger xml files to smaller bits (ending page sequences sooner 
to free up memory) but are there perhaps better alternatives?
- do I need to upgrade to 2.1.6 (ie are there enhancements in memory 
usage/load)?

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


Re: HTMLarea and Tabbed layout

2004-11-23 Thread Reinhard Poetz
Derek Hohls wrote:
Hugo
We appreciate the time taken to follow this one through;
as before, my point stands - can we not upgrade the 
exisitng Cocoon stylesheets to ensure that htmlArea in 
Cocoon *as shipped* can work properly with tables (now
that we know its possible).

Derek

[EMAIL PROTECTED] 2004/11/22 10:41:07 PM 

Hello,
To add some more details:
I remenber from a HTMLArea faq that the HTMLArea.replace() function is
causing the problem.
In every td cell in IE hit by this problem, there is a Javascript
HTMLArea.replace() call following the textarea/ element.
The only thing that has to be modified to the CForms stylesheets is to
move
this call to the onLoad of the body tag.
I just did this little experiment.
- I produced a file from my CForms pipeline that was OK in Firefox and
not
OK on IE (three HTMLArea fields in td cells). IE did show the
toolbar
only.
- I did a save source as HTML in the browser and saved it as a .html
file
- I added a resource mapping  for this *.html to my pilepline
- I loaded the *. html file in IE: same problem.
- I loaded the html file in an editor and moved the HTMLArea.replace()
calls
to the onLoad of the body.
- I reloaded the *. html file in IE, and now it was working OK.
- So it is working OK when your textarea/ elements are in the td
element. But your HTMLArea.replace() calls must be in onload.
- The solution that works for IE is also working for FireFox (I tested
with
Mozilla 1.7).
Hope this helps.
Hugo Burm


-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] 
Sent: Monday, November 22, 2004 11:54 AM
To: [EMAIL PROTECTED] 
Subject: RE: HTMLarea and Tabbed layout

Derek,
the fact that HTMLarea does not work under IE(6), comes from a
timing
problem. In detail: the HTMLarea is rendered before the table cell
containing the textarea is. Since I'm stuck with tables
myself, I need to
solve this too. My questions concerning this resulted in
suggestions to
modify the forms_onload handler to include your own modified
HTMLarea loader
function.
I haven't yet thoroughly tracked all of them down, but I
don't mind you
beating me on this. :-)
Bye, Helma

-Original Message-
From: Derek Hohls [mailto:[EMAIL PROTECTED] 
Sent: Monday, 22 November, 2004 08:06
To: [EMAIL PROTECTED] 
Subject: HTMLarea and Tabbed layout

Its now been established that HTMLarea does *not*
work under IE6 when using tables... see:

http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=109203952322577w=2

and that page layout needs to be achieved through
div tags instead:
http://marc.theaimsgroup.com/?l=xml-cocoon-
usersm=109203952322577w=2
While its simple enough to do for simple page layouts,
its more problematic when using the built-in Cocoon
stylesheets to render templates specified, for example,
with:
fi:styling layout=rows/
as the stylesheets use the archaic approach of tables
to achieve page layout, requiring a rewrite of a number
of templates.
Before I tackle this myself, I wondered if anyone else had
attempted this (and would be willing to share code) and,
also, if we should not look at upgrading the default sheets
supplied with the Cocoon installation in order to ensure
that (a) all the components play nicely together and (b)
support a more standards-compliant approach to page rendering?
Patches are welcome!
--
Reinhard
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cforms - ojb: generate unique id

2004-11-23 Thread Jorg Heymans
I think you're suffering from a few other knock-on effects and this is 
making your result page rendering fail.

But to get onto your question: unique id's can be generated by the OR 
mapping tool itself. Hibernate can do it, i'm sure ojb can as well.

Regards
Jorg
Jorge Davila wrote:
Hello all!:
I'm trying to agregate a new record in a postgresql database ... but 
when i put a widget field in my definition file I obtain an:

forms_onsubmit();
in my form (in the html page).
then, my result page is not showed.
How generate the unique id using flow?
Best regards,
Jorge Dávila.

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


RE: HTMLarea and Tabbed layout

2004-11-23 Thread H . vanderLinden
I'm working on it.

Bye, Helma

 -Original Message-
 From: Derek Hohls [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, 23 November, 2004 07:06
 To: [EMAIL PROTECTED]
 Subject: RE: HTMLarea and Tabbed layout
 
 
 Hugo
 
 We appreciate the time taken to follow this one through;
 as before, my point stands - can we not upgrade the 
 exisitng Cocoon stylesheets to ensure that htmlArea in 
 Cocoon *as shipped* can work properly with tables (now
 that we know its possible).
 
 Derek
 
  [EMAIL PROTECTED] 2004/11/22 10:41:07 PM 
 
 Hello,
 
 To add some more details:
 
 I remenber from a HTMLArea faq that the HTMLArea.replace() 
 function is causing the problem.
 
 In every td cell in IE hit by this problem, there is a Javascript
 HTMLArea.replace() call following the textarea/ element.
 The only thing that has to be modified to the CForms 
 stylesheets is to move this call to the onLoad of the body tag.
 
 I just did this little experiment.
 - I produced a file from my CForms pipeline that was OK in 
 Firefox and not OK on IE (three HTMLArea fields in td 
 cells). IE did show the toolbar only.
 - I did a save source as HTML in the browser and saved it as 
 a .html file
 - I added a resource mapping  for this *.html to my pilepline
 - I loaded the *. html file in IE: same problem.
 - I loaded the html file in an editor and moved the 
 HTMLArea.replace() calls to the onLoad of the body.
 - I reloaded the *. html file in IE, and now it was working OK.
 - So it is working OK when your textarea/ elements are in 
 the td element. But your HTMLArea.replace() calls must be in onload.
 - The solution that works for IE is also working for FireFox 
 (I tested with Mozilla 1.7).
 
 Hope this helps.
 
 
 Hugo Burm
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] 
  Sent: Monday, November 22, 2004 11:54 AM
  To: [EMAIL PROTECTED] 
  Subject: RE: HTMLarea and Tabbed layout
 
 
  Derek,
 
  the fact that HTMLarea does not work under IE(6), comes from a
 timing
  problem. In detail: the HTMLarea is rendered before the table cell 
  containing the textarea is. Since I'm stuck with tables 
 myself, I need 
  to solve this too. My questions concerning this resulted in
  suggestions to
  modify the forms_onload handler to include your own modified
  HTMLarea loader
  function.
 
  I haven't yet thoroughly tracked all of them down, but I don't mind 
  you beating me on this. :-)
 
  Bye, Helma
 
 
   -Original Message-
   From: Derek Hohls [mailto:[EMAIL PROTECTED]
   Sent: Monday, 22 November, 2004 08:06
   To: [EMAIL PROTECTED] 
   Subject: HTMLarea and Tabbed layout
  
  
   Its now been established that HTMLarea does *not*
   work under IE6 when using tables... see:
  
 
 http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=109203952322577w=2
 
   and that page layout needs to be achieved through
   div tags instead: http://marc.theaimsgroup.com/?l=xml-cocoon-
  usersm=109203952322577w=2
  
   While its simple enough to do for simple page layouts,
   its more problematic when using the built-in Cocoon
   stylesheets to render templates specified, for example,
   with:
   fi:styling layout=rows/
   as the stylesheets use the archaic approach of tables
   to achieve page layout, requiring a rewrite of a number
   of templates.
  
   Before I tackle this myself, I wondered if anyone else had
   attempted this (and would be willing to share code) and,
   also, if we should not look at upgrading the default sheets
   supplied with the Cocoon installation in order to ensure
   that (a) all the components play nicely together and (b)
   support a more standards-compliant approach to page rendering?
  
   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] 
 
 
 
 
 -
 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]
 

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



Re: bored with *talks* about docs (was: New documentation project?)

2004-11-23 Thread Joerg Heinicke
On 23.11.2004 07:27, Derek Hohls wrote:
Joerg
Could you supply the actual URL of the DTD itself... all I
could find pages discussing changes to the DTD.
I guess you have been viewing the correct file - it only includes the 
other parts, look at the end of the file. But v10 is more obvious: 
http://svn.apache.org/viewcvs.cgi/forrest/branches/FORREST_05_BRANCH/src/resources/schema/dtd/v10/document-v10.dtd?rev=20758view=log 
while v11 
http://svn.apache.org/viewcvs.cgi/forrest/branches/FORREST_05_BRANCH/src/resources/schema/dtd/document-v11.dtd?rev=20758view=markup
includes 
http://svn.apache.org/viewcvs.cgi/forrest/branches/FORREST_05_BRANCH/src/resources/schema/dtd/common-charents-v10.mod?rev=20758view=markup 
and 
http://svn.apache.org/viewcvs.cgi/forrest/branches/FORREST_05_BRANCH/src/resources/schema/dtd/document-v11.mod?rev=20758view=markup.

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


Re: Using htmlArea 'output' with SVG

2004-11-23 Thread Derek Hohls
Ugo

OK - so what needs to be done to integrate this into a
Cocoon application?  I assume this is a page generator
of some sort (or is a new transformer?), but I have not 
customized Cocoon in this way before.  Pointers to next
steps would be welcome...!

Thanks
Derek

 [EMAIL PROTECTED] 2004/11/23 09:59:37 AM 
Il giorno 23/nov/04, alle 07:31, Derek Hohls ha scritto:

 Thanks; are there any example demo'ing how this
 approach can be integrated into Cocoon... I'm afraid
 this hint is less than obvious to me, especially as it
 seem htmlArea is not producing tags at all...

The simple class attached will take in a String as produced by 
HTMLArea, parse it using Neko and return a DOM. You must of course have

the Neko parser on your classpath.

Ugo


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



Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

2004-11-23 Thread Philipp Rech
Hello Cocooners,



my Versions:

[Cocoon Version 2.1.6 *new*]

[Tomcat 5]

[Hibernate 2.1.6 / 2.1.7]



since my CForms are working so far (thanks to you guys) and the binding 

somwhat works too, i want to get started with Hibernate (2.1.6 or 2.1.7). I
have been trying stuff out the last week and i am still confused:



1) i have a connection-pool and datascource in Tomcat, Cocoon and Hibernate
which of the 3 should - and can I use? And if i use one how to tell other
players in the team? i would like to use a cocoon.xconf datasource, if i can...




2) i have heard about java-tools (wrapper) that integrate Hibernate with Cocoon

is anyone using those?



3) what is the best way to inegrate the two (Hibernate with Cocoon)? any
tutorials out there (the cocoon-wiki is kinda confusing and not up-to-date on
that i thought *sorry*)? any best-practices?



Thank you very much for your help!



philipp 



*ready to fall asleep till march*







-- 

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



Re: Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

2004-11-23 Thread Leszek Gawron
Philipp Rech wrote:
Hello Cocooners,

my Versions:
[Cocoon Version 2.1.6 *new*]
[Tomcat 5]
[Hibernate 2.1.6 / 2.1.7]

since my CForms are working so far (thanks to you guys) and the binding 

somwhat works too, i want to get started with Hibernate (2.1.6 or 2.1.7). I
have been trying stuff out the last week and i am still confused:

1) i have a connection-pool and datascource in Tomcat, Cocoon and Hibernate
which of the 3 should - and can I use? And if i use one how to tell other
players in the team? i would like to use a cocoon.xconf datasource, if i can...
Integrate hibernate with spring. Use spring managed datasource.
--
Leszek Gawron  [EMAIL PROTECTED]
Project ManagerMobileBox sp. z o.o.
+48 (61) 855 06 67  http://www.mobilebox.pl
mobile: +48 (501) 720 812   fax: +48 (61) 853 29 65
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Using htmlArea 'output' with SVG

2004-11-23 Thread Ugo Cei
Il giorno 23/nov/04, alle 13:11, Derek Hohls ha scritto:
OK - so what needs to be done to integrate this into a
Cocoon application?  I assume this is a page generator
of some sort (or is a new transformer?), but I have not
customized Cocoon in this way before.  Pointers to next
steps would be welcome...!
This is just a plain, old Java object with a single public static 
method. I don't know why you always manage to make things harder than 
they are ;-)

You can call it from flowscript like this:
var dom = HTMLParser.parse(form.lookupWidget(/field).value;
Of course, being a simple Java class, you can call it from Java code as 
well.

The only problem it has, AFAIK, is that it defines a single static 
instance of an XML parser, which is not threadsafe, so the only method 
that uses it is synchronized. This is not going to scale, of course, 
but it is not a problem unless you need to concurrently process a lot 
of HTML strings. And it has an explicit dependency on Xerces instead of 
using JAXP. As far as I can remember, I had some problems with JAXP and 
Neko, so I made it like that, but I can't remember the details at the 
moment.

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


smime.p7s
Description: S/MIME cryptographic signature


RE: bored with *talks* about docs (was: New documentation project?)

2004-11-23 Thread Tim.Holloway

Thanks!

 -Original Message-
 From: Joerg Heinicke [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 22, 2004 5:05 PM
 To: [EMAIL PROTECTED]
 Subject: Re: bored with *talks* about docs (was: New
 documentation project?)

 On 22.11.2004 22:43, [EMAIL PROTECTED] wrote:

  OK, I'll sing a chorus. As it happens, I spent the weekend
  constructing documentation on the Cocoon Portal, trying to fill in
  some holes and allow for people who aren't familiar with Cocoon and
  the pipeline paths specific to the Portal. Still a ways to go, but
  it's been a good start. I'll be glad to publish it once it's
  reasonably fit for human consumption. I don't yet know whether it
  would fit into the wiki, be suitable for inclusion in the
 mainstream
  docs, become a howto or even end up in dead tree form. All I can
  hope is that is proves useful. Since several people I'm
 working with
  are going to be depending on it, there is a certain incentive!

 Hi Tim,

 good to hear somebody starts ...

  I've done this in xdoc form, but I'd appreciate some help with the
  tools. I can't seem to find an XDOC DTD, so I'm concerned
 that I may
  have structural faults. Also, I'd like to find an XSLT to
 go from xdoc
  to PDF (FO), if I could.

 All the xdoc stuff is maintained in the forrest project now.
 They also have the DTDs:
 http://svn.apache.org/viewcvs.cgi/forrest/branches/FORREST_05_
 BRANCH/src/resources/schema/dtd/
 IIRC Cocoon still uses v10 of the DTDs. For the conversion to
 HTML or PDF Forrest is used too. To test and build the docs
 yourself you can try the instruction at
 http://wiki.apache.org/cocoon/CocoonWebsiteUpdate.

 Joerg

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



This e-mail and any files transmitted with it are confidential and are intended 
solely for the use of the individual or entity to whom it is addressed.  If you 
are not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, be advised that you have received this e-mail 
in error, and that any use, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited.

If you received this e-mail in error, please return the e-mail to the sender 
and delete it from your computer. Although our company attempts to sweep e-mail 
and attachments for viruses, it does not guarantee that either are virus-free 
and accepts no liability for any damage sustained as a result of viruses.

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



Re: Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

2004-11-23 Thread Ugo Cei
Il giorno 23/nov/04, alle 13:52, Philipp Rech ha scritto:
1) i have a connection-pool and datascource in Tomcat, Cocoon and 
Hibernate
which of the 3 should - and can I use? And if i use one how to tell 
other
players in the team? i would like to use a cocoon.xconf datasource, if 
i can...
There was a patch somewhere that enabled Hibernate to use an Avalon 
datasource, but it's not been maintained anymore AFAIK. You can use a 
container-provided (Tomcat in your case) datasource, or use a 
Hibernate-local datasource. The latter would work even outside of a 
J2EE container, but in any case switching between the two is just a 
matter of changing a config file, so in the end it makes no difference 
at all.

2) i have heard about java-tools (wrapper) that integrate Hibernate 
with Cocoon
is anyone using those?
What do you mean by integrate? I am aware of no special tools.
3) what is the best way to inegrate the two (Hibernate with Cocoon)? 
any
tutorials out there (the cocoon-wiki is kinda confusing and not 
up-to-date on
that i thought *sorry*)? any best-practices?
What is considered a best practice in this issue is largely a matter 
of opinion. My own best practice is to use the Spring framework as a 
glue to bind together Hibernate and various other enterprise 
resources. You can find a sample here: 
http://new.cocoondev.org/main/projects/43

You might also want to have a look at the slides I presented at the 
last GetTogether: 
http://www.cbim.it/it/bacheca/download/varie/Ugo_Cei_GT2004.pdf

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


smime.p7s
Description: S/MIME cryptographic signature


Re: Using htmlArea 'output' with SVG

2004-11-23 Thread Derek Hohls
Ugo

Well, all this may be clear to you... but not to me :{
Where I am trying to get to is not to deal with single
bits of htmlArea text, but with an entire file created
using a Cform.  Are you proposing that each field containing
htmlArea text must be intercepted and processed before 
the form data is stored?  Or is when you read it back?
I am not sure why you have created the dom variable
in your script below, or what you would do with it.

There are likely to be a number of users, all creating and
drawing data from different files via CForms; is this
likely to be a problem?

Derek

 [EMAIL PROTECTED] 2004/11/23 03:10:59 PM 
Il giorno 23/nov/04, alle 13:11, Derek Hohls ha scritto:

 OK - so what needs to be done to integrate this into a
 Cocoon application?  I assume this is a page generator
 of some sort (or is a new transformer?), but I have not
 customized Cocoon in this way before.  Pointers to next
 steps would be welcome...!

This is just a plain, old Java object with a single public static 
method. I don't know why you always manage to make things harder than 
they are ;-)

You can call it from flowscript like this:

var dom = HTMLParser.parse(form.lookupWidget(/field).value;

Of course, being a simple Java class, you can call it from Java code as

well.

The only problem it has, AFAIK, is that it defines a single static 
instance of an XML parser, which is not threadsafe, so the only method

that uses it is synchronized. This is not going to scale, of course, 
but it is not a problem unless you need to concurrently process a lot 
of HTML strings. And it has an explicit dependency on Xerces instead of

using JAXP. As far as I can remember, I had some problems with JAXP and

Neko, so I made it like that, but I can't remember the details at the 
moment.

Ugo

-- 
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: Memory usage

2004-11-23 Thread Ralph Goers
Jan Hoskens wrote:
- do I need to upgrade to 2.1.6 (ie are there enhancements in memory 
usage/load)?

There was a problem with file handles continuing to grow that has been 
fixed. I don't know if that would translate into memory usage problems 
though.  I certainly would try it.

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


Re: Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

2004-11-23 Thread Johannes Textor
Hi Phillipp,
Ugo Cei wrote:
Il giorno 23/nov/04, alle 13:52, Philipp Rech ha scritto:
1) i have a connection-pool and datascource in Tomcat, Cocoon and 
Hibernate
which of the 3 should - and can I use? And if i use one how to tell 
other
players in the team? i would like to use a cocoon.xconf datasource, 
if i can...

I have compiled some information on the wiki that covers this aspect.
you can find it here:
http://wiki.apache.org/cocoon/CocoonAndHibernateTutorial
It covers setting up Hibernate to use the cocoon connection pool.
Also have a look at Derek's page at
http://wiki.apache.org/cocoon/GettingStartedWithCocoonAndHibernate
It contains some bits of information.
Both docs are still in a poor state but they are pretty recent and I 
tested the installation
instructions against the 2.1.6 build.

If you have more questions about Cocoon  Hibernate, please feel free to 
contact me
directly as I want to continue writing up docs about these topics and 
beginner's questions
are always helpful.

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


RE: Using htmlArea 'output' with SVG

2004-11-23 Thread H . vanderLinden
Derek,

I'm currently working on updating the HTMLarea sample to 
1. work in tables in IE6
2. use Bruno's HtmlCleanerConvertor
3. output html-ized data, rather than raw (i.e. as string)

for 3. I currently use a simple XSL stylesheet that matches htmlarea tags
and displays them with disable-output-escaping=yes. If anyone can come up
with a better solution or modifies Ugo's HTMLparser, please do so.

For now Reinhard is looking things over.

Bye, Helma


 -Original Message-
 From: Derek Hohls [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, 23 November, 2004 14:39
 To: [EMAIL PROTECTED]
 Subject: Re: Using htmlArea 'output' with SVG
 
 
 Ugo
 
 Well, all this may be clear to you... but not to me :{
 Where I am trying to get to is not to deal with single
 bits of htmlArea text, but with an entire file created
 using a Cform.  Are you proposing that each field containing 
 htmlArea text must be intercepted and processed before 
 the form data is stored?  Or is when you read it back?
 I am not sure why you have created the dom variable
 in your script below, or what you would do with it.
 
 There are likely to be a number of users, all creating and 
 drawing data from different files via CForms; is this likely 
 to be a problem?
 
 Derek
 
  [EMAIL PROTECTED] 2004/11/23 03:10:59 PM 
 Il giorno 23/nov/04, alle 13:11, Derek Hohls ha scritto:
 
  OK - so what needs to be done to integrate this into a
  Cocoon application?  I assume this is a page generator
  of some sort (or is a new transformer?), but I have not customized 
  Cocoon in this way before.  Pointers to next steps would be 
  welcome...!
 
 This is just a plain, old Java object with a single public static 
 method. I don't know why you always manage to make things harder than 
 they are ;-)
 
 You can call it from flowscript like this:
 
 var dom = HTMLParser.parse(form.lookupWidget(/field).value;
 
 Of course, being a simple Java class, you can call it from 
 Java code as
 
 well.
 
 The only problem it has, AFAIK, is that it defines a single static 
 instance of an XML parser, which is not threadsafe, so the only method
 
 that uses it is synchronized. This is not going to scale, of course, 
 but it is not a problem unless you need to concurrently process a lot 
 of HTML strings. And it has an explicit dependency on Xerces 
 instead of
 
 using JAXP. As far as I can remember, I had some problems 
 with JAXP and
 
 Neko, so I made it like that, but I can't remember the details at the 
 moment.
 
   Ugo
 
 -- 
 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]
 

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



Reliable XML/XSL editors for Cocoon development ?

2004-11-23 Thread Laurent Perez
Hello

We are using Dreamweaver for our current websites design, producing
xhtml pages - templates - containing custom tags that once hosted on
our server are being replaced on the fly by database data, which is a
very classic setup, I guess :)

We'll be moving to a Cocoon based backend soon, mostly for enterprise
needs (i.e we need to host and access various SOAP web-services - Java
behind -, and exchange XML flows with our clients, which are in the
publishing industry, I assume Cocoon is the right choice), but I'm
currently trying to figure out if Cocoon can be a reliable solution to
manage several web sites (I do not mean web applications here, only
sites, like small sites based on a small database) : afaik, you have
two popular methods to output website content, XSP versus
Flowscript+JX, which is fine but both are very code-based, I mean
websites designers are not Java or XML experts (or both).

My problem is that our designers - they did spend several days
evaluating Cocoon - are afraid to move from our current DW+PHP
backend, because they think the whole sitemap  pattern hit  xsp or
flowscript + jx  transformer  result is just too obscure and
difficult to dig into, ie when editing a website you have to remember
the whole sitemap schema, especially when using aggregates. I also
don't understand the right choice between having a mega-huge xsl sheet
able to transform every page on our site based on call-templates or
one xsl per page transformation path. Plus they told me XSP was
similar to our PHP approach but was an obsolete (?) framework, and
Flowscripts look nice but require a huge Java knowledge. What I am
looking for is an editor being able to handle Cocoon-based websites :
for example, something being able to traverse a sitemap, find all
matching patterns, build a tree of patterns, output the resulting xml
flows (from xsp or jx sources), and visually edit elements of the xsl
sheet. Dreamweaver has no clue about XML/XSL editing, XMLSpy has no
clue about visual editing, Eclipse has never been a web editor, and
Cocoon Wiki is dry on visual editors reviews.

What are you guys using when dealing with 'pure' website design and
management under Cocoon ? Thanks for any input :)

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



Re: Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

2004-11-23 Thread Derek Hohls
Yup; this is an old ask (Hibernate and Cocoon) -
I think the most up-to-date tutorial on getting started 
is on the wiki at: 
http://wiki.apache.org/cocoon/CocoonAndHibernateTutorial
(author is Johannes Textor...) 
Others are apparently working on tutorials; until these
are done, you will either have to wait, or read up on 
things yourseld - my ideal page for a comprehensive 
treatement of this topic is at:
http://wiki.apache.org/cocoon/GettingStartedWithCocoonAndHibernate
Please feel free to fill in with your own learning!

Derek

 [EMAIL PROTECTED] 2004/11/23 02:52:50 PM 
Hello Cocooners,

my Versions:
[Cocoon Version 2.1.6 *new*]
[Tomcat 5]
[Hibernate 2.1.6 / 2.1.7]

since my CForms are working so far (thanks to you guys) and the binding

somwhat works too, i want to get started with Hibernate (2.1.6 or
2.1.7). I
have been trying stuff out the last week and i am still confused:

1) i have a connection-pool and datascource in Tomcat, Cocoon and
Hibernate
which of the 3 should - and can I use? And if i use one how to tell
other
players in the team? i would like to use a cocoon.xconf datasource, if
i can...


2) i have heard about java-tools (wrapper) that integrate Hibernate
with Cocoon
is anyone using those?

3) what is the best way to inegrate the two (Hibernate with Cocoon)?
any
tutorials out there (the cocoon-wiki is kinda confusing and not
up-to-date on
that i thought *sorry*)? any best-practices?

Thank you very much for your help!

philipp 

*ready to fall asleep till march*



-- 

-
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: Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

2004-11-23 Thread Andrew M
Phillipp,
I am using the following setup

1. Jboss 4.0.0 - Hibernate is included with this build
2. Cocoon 2.1.5.1 (Cforms/Flow)
3. PostgreSQL 8

JNDI is used to connect Hibernate to postgreSQL. Connection pooling is handled by JNDI.

regards

Andrew

On 23 Nov 2004, at 12:52, Philipp Rech wrote:

Hello Cocooners,

my Versions:
[Cocoon Version 2.1.6 *new*]
[Tomcat 5]
[Hibernate 2.1.6 / 2.1.7]

since my CForms are working so far (thanks to you guys) and the binding 
somwhat works too, i want to get started with Hibernate (2.1.6 or 2.1.7). I
have been trying stuff out the last week and i am still confused:

1) i have a connection-pool and datascource in Tomcat, Cocoon and Hibernate
which of the 3 should - and can I use? And if i use one how to tell other
players in the team? i would like to use a cocoon.xconf datasource, if i can...


2) i have heard about java-tools (wrapper) that integrate Hibernate with Cocoon
is anyone using those?

3) what is the best way to inegrate the two (Hibernate with Cocoon)? any
tutorials out there (the cocoon-wiki is kinda confusing and not up-to-date on
that i thought *sorry*)? any best-practices?

Thank you very much for your help!

philipp 

*ready to fall asleep till march*



-- 

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


inline: beya-email.gif
 +The home of urban music
+ http://www.beyarecords.com

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

Re: cforms - ojb: generate unique id

2004-11-23 Thread Jorge Davila
Oops! The same answer with more elements:
Reading the samples I can't find one sample demostrating how to generate 
unique id using ojb... well, in the samples, employee e.g. ... the 
unique id are asigned using instructions like:

function form2bean(form) {
 // .
   var contact = new Packages.org.apache.cocoon.forms.samples.Contact();
contact.setId(1);
 // .
bean.addContact(contact);
form.load(bean);
form.showForm(form2-display-pipeline);
form.save(bean);
cocoon.sendPage(form2bean-success-pipeline, { form2bean: bean });
}
and here the two questions:
1.- What line a need to autogenerate an unique id
2.- How I can do to show my final html page. When I put a field identity 
for the id in the html form is placed an forms_onsubmit() and the final 
result is not showed.

Thank for your response,
Jorge Dávila.
Jorg Heymans wrote:
I think you're suffering from a few other knock-on effects and this is 
making your result page rendering fail.

But to get onto your question: unique id's can be generated by the OR 
mapping tool itself. Hibernate can do it, i'm sure ojb can as well.

Regards
Jorg
Jorge Davila wrote:
Hello all!:
I'm trying to agregate a new record in a postgresql database ... but 
when i put a widget field in my definition file I obtain an:

forms_onsubmit();
in my form (in the html page).
then, my result page is not showed.
How generate the unique id using flow?
Best regards,
Jorge Dávila.

-
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: Memory usage

2004-11-23 Thread Derek Hohls
Jan

I am having the same problems when doing a refresh on a
page that displays an SVG - I find after a few times I have to
restart Tomcat.  

Any solutions to this would be welcome! (I don't have the 
chopping up option open to me, though)

Derek

 [EMAIL PROTECTED] 2004/11/23 09:55:18 AM 
Hi,

I'm working with cocoon 2.1.5. Yesterday I had some problems rendering
a 
pdf (fop). As I had some trouble before with memory usage, I know that

I'll have to check the size of the memory again. But I didn't have any

problems rendering pdf before. Now today I just restarted the tomcat
and 
tried again. This time no problems with pdf rendering. So here's the 
question part:

- if the webapp is running for a longer period of time, will this
affect 
memory usage a lot?
- I'm using fop to generate pdf, I already buillt in some mechanism to

chop the larger xml files to smaller bits (ending page sequences sooner

to free up memory) but are there perhaps better alternatives?
- do I need to upgrade to 2.1.6 (ie are there enhancements in memory 
usage/load)?

Kind Regards,
Jan

-
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: bored with *talks* about docs (was: New documentation project?)

2004-11-23 Thread Derek Hohls
And to view v10 requires:

http://svn.apache.org/viewcvs.cgi/forrest/branches/FORREST_05_BRANCH/src/resources/schema/dtd/v10/document-v10.dtd?view=markup

 [EMAIL PROTECTED] 2004/11/23 11:03:04 AM 
On 23.11.2004 07:27, Derek Hohls wrote:

 Joerg
 
 Could you supply the actual URL of the DTD itself... all I
 could find pages discussing changes to the DTD.

I guess you have been viewing the correct file - it only includes the 
other parts, look at the end of the file. But v10 is more obvious: 
http://svn.apache.org/viewcvs.cgi/forrest/branches/FORREST_05_BRANCH/src/resources/schema/dtd/v10/document-v10.dtd?rev=20758view=log

while v11 
http://svn.apache.org/viewcvs.cgi/forrest/branches/FORREST_05_BRANCH/src/resources/schema/dtd/document-v11.dtd?rev=20758view=markup

includes 
http://svn.apache.org/viewcvs.cgi/forrest/branches/FORREST_05_BRANCH/src/resources/schema/dtd/common-charents-v10.mod?rev=20758view=markup

and 
http://svn.apache.org/viewcvs.cgi/forrest/branches/FORREST_05_BRANCH/src/resources/schema/dtd/document-v11.mod?rev=20758view=markup.

Joerg

-
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: Reliable XML/XSL editors for Cocoon development ?

2004-11-23 Thread Bertrand Delacretaz
Le 23 nov. 04, à 15:36, Laurent Perez a écrit :
...What I am
looking for is an editor being able to handle Cocoon-based websites :
for example, something being able to traverse a sitemap, find all
matching patterns, build a tree of patterns, output the resulting xml
flows (from xsp or jx sources), and visually edit elements of the xsl
sheet
I don' think you'll find something today that will make people coming 
from a visual Dreamweaver-like environment comfortable with Cocoon. I'd 
love to be proven wrong though, but it's not only the XSLT, there are 
the sitemaps, database access code, etc. as you have noticed.

Depending on the size and scope of your project, it might be 
interesting to create some adaptors to make it possible for your 
people to design publishing templates more or less as they're doing 
today and use them in Cocoon. But there's (AFAIK) no turnkey solution 
to do this today, and it's not a trivial project.

Another interesting possibility would be to use Cocoon as a back-end 
for database access and XML data generation only, and couple this 
(REST-like probably) with your existing PHP/Dreamweaver setup used as a 
front-end only. For the back-end you'll need more technical skills than 
your team (IIUC) has today, but the potential improvements in 
flexibility and data exchanges might be well worth it.

And yes, we don't recommend using XSP for new projects, most of this 
community's efforts are focused on the Power Trio (Pipelines, Flow, 
Forms) today.

If yours is basically a database reporting application, XReporter 
(http://www.cocoondev.org/xreporter) might be an option maybe.

Finally, here's my shameless plug of the day: you might find my GT 2004 
presentation interesting on these subjects, it's available at 
http://cocoon.apache.org/mirror.cgi under material from events / gt 
2004.

Hope this helps!
-Bertrand

smime.p7s
Description: S/MIME cryptographic signature


Re: Memory usage

2004-11-23 Thread JD Daniels
Not sure if this is related to your problems, but I had memory problems 
with tables in my fo templates with fop. Cutting out  tables from my 
stylesheets fixed the problem- I think it was fop related.

JD
Jan Hoskens wrote:
Hi,
I'm working with cocoon 2.1.5. Yesterday I had some problems rendering 
a pdf (fop). As I had some trouble before with memory usage, I know 
that I'll have to check the size of the memory again. But I didn't 
have any problems rendering pdf before. Now today I just restarted the 
tomcat and tried again. This time no problems with pdf rendering. So 
here's the question part:

- if the webapp is running for a longer period of time, will this 
affect memory usage a lot?
- I'm using fop to generate pdf, I already buillt in some mechanism to 
chop the larger xml files to smaller bits (ending page sequences 
sooner to free up memory) but are there perhaps better alternatives?
- do I need to upgrade to 2.1.6 (ie are there enhancements in memory 
usage/load)?

Kind Regards,
Jan
-
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: Reliable XML/XSL editors for Cocoon development ?

2004-11-23 Thread Andrew M
Laurent,
try the latest version of eclipse (www.eclipse.org), and then download 
the xml plugin from Bocaloco software (http://www.xmlbuddy.com/).

Andrew
On 23 Nov 2004, at 14:36, Laurent Perez wrote:
Hello
We are using Dreamweaver for our current websites design, producing
xhtml pages - templates - containing custom tags that once hosted on
our server are being replaced on the fly by database data, which is a
very classic setup, I guess :)
We'll be moving to a Cocoon based backend soon, mostly for enterprise
needs (i.e we need to host and access various SOAP web-services - Java
behind -, and exchange XML flows with our clients, which are in the
publishing industry, I assume Cocoon is the right choice), but I'm
currently trying to figure out if Cocoon can be a reliable solution to
manage several web sites (I do not mean web applications here, only
sites, like small sites based on a small database) : afaik, you have
two popular methods to output website content, XSP versus
Flowscript+JX, which is fine but both are very code-based, I mean
websites designers are not Java or XML experts (or both).
My problem is that our designers - they did spend several days
evaluating Cocoon - are afraid to move from our current DW+PHP
backend, because they think the whole sitemap  pattern hit  xsp or
flowscript + jx  transformer  result is just too obscure and
difficult to dig into, ie when editing a website you have to remember
the whole sitemap schema, especially when using aggregates. I also
don't understand the right choice between having a mega-huge xsl sheet
able to transform every page on our site based on call-templates or
one xsl per page transformation path. Plus they told me XSP was
similar to our PHP approach but was an obsolete (?) framework, and
Flowscripts look nice but require a huge Java knowledge. What I am
looking for is an editor being able to handle Cocoon-based websites :
for example, something being able to traverse a sitemap, find all
matching patterns, build a tree of patterns, output the resulting xml
flows (from xsp or jx sources), and visually edit elements of the xsl
sheet. Dreamweaver has no clue about XML/XSL editing, XMLSpy has no
clue about visual editing, Eclipse has never been a web editor, and
Cocoon Wiki is dry on visual editors reviews.
What are you guys using when dealing with 'pure' website design and
management under Cocoon ? Thanks for any input :)
-
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: Using htmlArea 'output' with SVG

2004-11-23 Thread Ugo Cei
Il giorno 23/nov/04, alle 14:39, Derek Hohls ha scritto:
Well, all this may be clear to you... but not to me :{
I'm not saying that it should be crystal clear to you, just that you 
should not try to make it more complex than it is :)

Where I am trying to get to is not to deal with single
bits of htmlArea text, but with an entire file created
using a Cform.  Are you proposing that each field containing
htmlArea text must be intercepted and processed before
the form data is stored?
Yes. It would be better if you stored well-formed XML data by cleaning 
it once rather than every time you read it back.

I am not sure why you have created the dom variable
in your script below, or what you would do with it.
My method returns an org.w3c.dom.Document, i.e. an in-memory 
representation of a well-formed XML document. What you want to do with 
it is up to you. In the application from which I excerpted that class, 
I serialize it to a String and store it in a CLOB in a relational 
database.


There are likely to be a number of users, all creating and
drawing data from different files via CForms; is this
likely to be a problem?
If contention is a problem, you can always pool instances of XML 
parsers, or use the parser provided by Avalon that is already pooled 
and made available to Cocoon components. Since I usually tend to stay 
away from Avalon code, I am sorry but I cannot help you with this.

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


smime.p7s
Description: S/MIME cryptographic signature


Socket reader. Reading large amount of data

2004-11-23 Thread Rui Alberto L.
Hi all,
I have a reader that writes some content into a socket and then reads
back the socket response and writes it in an OutputStream...

Everything works fine while the data read from the socket remains bellow
3Mb; when it needs to read more then a few Mb (10Mb), after a 
few minutes a response with 0 bytes is returned.

I'm sending my code in attachment in the hope that someone can 
find the reason why this is happening.

Any help is really appreciated.
Thanks in advance.

Rui
-- 
package cava.readers;

import java.net.Socket;
import java.io.PrintWriter;
import java.io.IOException;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.reading.AbstractReader;
import org.apache.cocoon.environment.Environment;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceValidity;


import org.apache.cocoon.environment.Response;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.avalon.framework.parameters.ParameterException;

import org.apache.cocoon.environment.Request;

import org.apache.cocoon.components.source.SourceUtil;
import org.apache.excalibur.source.SourceException;
import org.apache.cocoon.environment.SourceResolver;
import java.util.Map;
import org.xml.sax.SAXException;
import java.io.BufferedWriter;
import java.io.OutputStreamWriter;
import java.io.InputStreamReader;
import java.io.InputStream;
import java.io.BufferedReader;



import org.apache.avalon.framework.parameters.Parameters;



public class SocketReader extends AbstractReader
{

protected Source inputSource;
protected InputStream inputStream;
 
protected Response response;
protected Request request;
protected long expires;
protected int bufferSize;


/** config-parameter name for specifying the backend host */
public static final String CONFIGURED_BACKEND_HOST = backend-host;
 
/** config-parameter name for specifying the backend port */
public static final String CONFIGURED_BACKEND_PORT = backend-port;

/**Maximum number of rows that should be returned*/
public static final String MAX_ROWS_RETURNED = max-cdrs;

public static final String OUTPUT_CONTENT_TYPE = content-type;

public static final String OUTPUT_ENCODING = encoding;

public static final String DEFAULT_FILENAME = default-filename;


public int max_rows;

public String output_type = null;

public String encoding = null;

public String default_file_name = null;
/** Configured backend-host */
public String backend_host = null;
 
/** Configured backend-port */
public int backend_port;

private Socket socket = null;

//Output channel
private PrintWriter pw = null;

//Input channel
private BufferedReader buf_reader = null;


 /**
 * Constructor
 */
public SocketReader() 
{
}

/**
 * Set the sitemap-provided configuration.
 */
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters params)
throws ProcessingException, SAXException, IOException 
{
  super.setup(resolver, objectModel, src, params);
 
  request = ObjectModelHelper.getRequest(objectModel);
  response = ObjectModelHelper.getResponse(objectModel);
 
  expires = params.getParameterAsInteger(expires, -1);
  bufferSize = params.getParameterAsInteger(buffer-size,8192);
 
  try 
  {
inputSource = resolver.resolveURI(src);
  }
  catch (SourceException se) 
  {
throw SourceUtil.handle(Error during resolving of ' + src + '., se);
  }
  try
  {
backend_host = params.getParameter( CONFIGURED_BACKEND_HOST );
  }
  catch(ParameterException pe)
  {
String msg=missing parameter +CONFIGURED_BACKEND_HOST+ in sitemap;
super.getLogger().error(msg);
throw new ProcessingException(msg);
  }
 
  try
  {
backend_port = new Integer(params.getParameter( CONFIGURED_BACKEND_PORT )).intValue();
  }
  catch(ParameterException pe)
  {
String msg=missing parameter +CONFIGURED_BACKEND_PORT + in 

Antwort: Reliable XML/XSL editors for Cocoon development ?

2004-11-23 Thread manfred . weigel

Hi,

There are two Eclipse plugins available.

sunbow is available from www.s-und-n.de
and www.anyware-tech.com offers a new plugin including a WYSIWYG CForms
Editor.

Have a look at them, maybe they fit your needs. For me the best HTML coding
tool is Ultraedit :-) But of course without WYSIWYG

mit freundlichen Grüßen / kind regards
Manfred Weigel

Raiffeisen Zentralbank Österreich AG
ORG/IT - Software Development
A-1030 Vienna, Am Stadtpark 9


|-+-
| | |
| |[EMAIL PROTECTED] |
| | |
| |23.11.2004 15:36 |
| |Bitte antworten an   |
| |   users |
| | |
|-+-
  
-|
  | 
|
  |An:  [EMAIL PROTECTED] 
|
  |Kopie:   
|
  |Blindkopie:  
|
  |Thema:   Reliable XML/XSL editors for Cocoon development ?   
|
  
-|




Hello

We are using Dreamweaver for our current websites design, producing
xhtml pages - templates - containing custom tags that once hosted on
our server are being replaced on the fly by database data, which is a
very classic setup, I guess :)

We'll be moving to a Cocoon based backend soon, mostly for enterprise
needs (i.e we need to host and access various SOAP web-services - Java
behind -, and exchange XML flows with our clients, which are in the
publishing industry, I assume Cocoon is the right choice), but I'm
currently trying to figure out if Cocoon can be a reliable solution to
manage several web sites (I do not mean web applications here, only
sites, like small sites based on a small database) : afaik, you have
two popular methods to output website content, XSP versus
Flowscript+JX, which is fine but both are very code-based, I mean
websites designers are not Java or XML experts (or both).

My problem is that our designers - they did spend several days
evaluating Cocoon - are afraid to move from our current DW+PHP
backend, because they think the whole sitemap  pattern hit  xsp or
flowscript + jx  transformer  result is just too obscure and
difficult to dig into, ie when editing a website you have to remember
the whole sitemap schema, especially when using aggregates. I also
don't understand the right choice between having a mega-huge xsl sheet
able to transform every page on our site based on call-templates or
one xsl per page transformation path. Plus they told me XSP was
similar to our PHP approach but was an obsolete (?) framework, and
Flowscripts look nice but require a huge Java knowledge. What I am
looking for is an editor being able to handle Cocoon-based websites :
for example, something being able to traverse a sitemap, find all
matching patterns, build a tree of patterns, output the resulting xml
flows (from xsp or jx sources), and visually edit elements of the xsl
sheet. Dreamweaver has no clue about XML/XSL editing, XMLSpy has no
clue about visual editing, Eclipse has never been a web editor, and
Cocoon Wiki is dry on visual editors reviews.

What are you guys using when dealing with 'pure' website design and
management under Cocoon ? Thanks for any input :)

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






This message and any attachment (the Message) are confidential. If you
have received the Message in error, please notify the sender immediately
and delete the Message from your system , any use of the Message is
forbidden.
Correspondence via e-mail is primarily for information purposes. RZB
neither makes nor accepts legally binding statements unless otherwise
agreed to the contrary.


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



POSTing Binary Data to Cocoon

2004-11-23 Thread Mike Dickson



Background: 
I have a 
.wav file being POSTed to my Cocoon app from a remote service I have not 
controll over. I am trying to use Hibernate to save the .wav file to a 
BLOB in mySQL using a custom Cocoon Action.

Question:In my custom Action the parameters I get 
from the pipeline are all Strings. What is the proper way in Coccon to get 
the .wav out of the parameter as binary data? 

Would something like 
this work?
 
String paramValue = parameters.getParameter("wav"); 
 
byte [] bytes = paramValue.getBytes();

I also see there is 
a java.sql.Blob class, should I use that instead?


Thanks,

Mike 
D.


chaperon troubles

2004-11-23 Thread Andrew MacDonald
Hello,
I am trying to transform a wiki file into XML using
the Chaperon LexicalTransformer and ParserTransformer.
 However, I cannot get either to work.  When I try
using the 'wiki.xgrm' file included with Chaperon, I
get the following error:

FATAL_E (2004-11-23) 12:47.43:359  
[core.xslt-processor] (/TaporMain/portal/portal)
http8080-Processor23/TraxErrorHandler: Error in
TraxTransformer:
javax.xml.transform.TransformerException:
org.apache.cocoon.ProcessingException: Could not setup
pipeline.: org.xml.sax.SAXException: Unexpected
element grammar at
file:/C:/eclipse-3.0/workspace/Tapor-Portal/portal/coplets/introduction/grammars/wiki.xgrm:2:10

This makes no sense to me, as the wiki.xgrm file is
valid according to the correspoding DTD.

Also, when trying to use Cocoon to convert the
wiki.grm to xgrm and xlex files (as explained here:
http://chaperon.sourceforge.net/using-convert-grm.html)
only an essentially empty document is returned:

grammar
xmlns=http://chaperon.sourceforge.net/schema/grammar/1.0;
xmlns:cinclude=http://apache.org/cocoon/include/1.0;
!--This file was generated! Don't edit!--
priority/
production symbol=codeblock
nonterminal symbol=codecloseitem/
/production
start symbol=document/
/grammar

I am using version 2.1.5 of Cocoon.  Any help would be
greatly appreciated.

Andrew




__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


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



Re: POSTing Binary Data to Cocoon

2004-11-23 Thread Andrew M
Mike,
i use hibernate to do read in an image as a byte array. This should point you in the right direction a to reading in a *.wav file.

1:
?xml version=1.0?>

xsp:page 
language=java 
xmlns:xsp=http://apache.org/xsp
xmlns:xsp-session=http://apache.org/xsp/session/2.0
create-session=true
xmlns:util=http://apache.org/xsp/util/2.0
xmlns:xsp-cookie=http://apache.org/xsp/cookie/2.0
xmlns:xsp-request=http://apache.org/request/util/2.0
xmlns:sendmail=http://apache.org/cocoon/sendmail/1.0
>
xsp:structure>

/xsp:include>
   xsp:include>test.ArtistImages/xsp:include>
/xsp:structure>


page>

/title>
content>
xsp:logic>
GraphicLoader graph = new GraphicLoader();
ArtistImages newImages = new ArtistImages();
newImages.setArtistPhoto(graph.readImage(Logic1.jpg));


/xsp:logic>


/content>
/page>
/xsp:page>

2:
GraphicLoader.java

import java.io.*;

public class GraphicLoader{

public final byte[] readImage(String imageName) throws IOException{

FileInputStream fis = new FileInputStream(specify path to save file + imageName);
byte[] buf = new 4096];
ByteArrayOutputStream baos = new ByteArrayOutputStream();


int len = 0;


while ((len = fis.read(buf)) != -1){


baos.write(buf,0,len);
}


return baos.toByteArray();
}
}

3:
Hibernate Map:

class name=ArtistImages table=artistimagestbl>
id name=ID column=image_id>
generator class=assigned/>
/id>
property name=ArtistPhoto column=artist_photo type=binary/>
/class>

4:
Persistent class:

public class ArtistImages implements Serializable{

private byte[] ArtistPhoto;

public byte[] getArtistPhoto() {
return ArtistPhoto;
}
public void setArtistPhoto(byte[] newArtistPhoto) {
this.ArtistPhoto = newArtistPhoto;
}

Hope this helps.


Andrew

This class reads the image in as a class array. To read it back, convert the bytearray into base64

On 23 Nov 2004, at 18:51, Mike Dickson wrote:

Background:   I have a .wav file being POSTed to my Cocoon app from a remote service I have not controll over.  I am trying to use Hibernate to save the .wav file to a BLOB in mySQL using a custom Cocoon Action.
 
Question: In my custom Action the parameters I get from the pipeline are all Strings.  What is the proper way in Coccon to get the .wav out of the parameter as binary data? 
  
Would something like this work?
    String paramValue = parameters.getParameter(wav); 
     byte [] bytes = paramValue.getBytes(); 
 
I also see there is a java.sql.Blob class, should I use that instead?
 
 
Thanks,
 
Mike D.

inline: beya-email.gif
 +The home of urban music
+ http://www.beyarecords.com

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

Re: Cocoon portal and META Tag

2004-11-23 Thread Anna Bikkina
Here is my code that is causing this problem.

I have a xsp that takes input parameters and uses post method. 



form href=cocoon:/coplets/search/sampleoc.xsp name=form1
method=post
 input name=sampleoc type=text
 input name=user type=text 
 input name=startdate type=text 
 input name=submit1 value=GO type=submit onClick=go()/
 input name=nowait value=false type=hidden /
/form


sampeloc has a hidden parameter nowait. If nowait is false then it goes
to wait.xsp. Wait.xsp is a page which just contains a animated gif which
contains a meta tag so that it can redirect to a different page.I wanted
to have wait.xsp in between the main page and results page because users
can understand that something is going on  because searching is taking a
long time and to display output when user submits sampleoc.xsp is almost
1 minute away. So for user interaction we wanted to have a animated gif
till the output search is done.In meta tag of wait.xsp I made nowait =
true so that in the sitemap it goes to the results page where database
query is done and results are displayed. When the submit method is get
everything is going on as excepted otherwise once the parameters are
submitted it goes to the results page and then we click back button.
Type in different parameters and click on submit the search is still
going on for the previous parameters. ANy help is greatly appreciated.

head tag in wait.xsp


head

String requestattr = 0;url=portal?nowait=true;
Enumeration attrnames = request.getParameterNames();
while(attrnames.hasMoreElements()) {
String attrname = (String)attrnames.nextElement();  
if(!attrname.equals(nowait)) {
String attrvalue = request.getParameter(attrname);
requestattr = requestattr + amp; + attrname + = + attrvalue;
}
}   
meta http-equiv=refresh 
xsp:attribute
name=contentxsp:exprrequestattr/xsp:expr/xsp:attribute
/meta
/head
   
!-- SAMPLE OC  SEARCH IN SITEMAP --
   map:match pattern=sampleoc.xsp
map:select type=request-parameter
map:parameter name=parameter-name value=nowait/
map:when test=false
  map:generate type=serverpages src=wait.xsp /
/map:when
map:otherwise 
  map:act type=get-sample   
map:parameter name=sample 
value={request-param:sampleoc}/ 
map:generate type=serverpages 
src=traderocresult.xsp/ 

/map:act

/map:otherwise
/map:select

 map:transform/
 map:serialize/
   /map:match
   !-- END OF SAMPLE OC SEARCH--
   



On Mon, 2004-11-22 at 18:21, Johannes Textor wrote:
 Hi Anna,
 
 I'm having a hard time figuring out what your problem
 might be ... it would be useful if you could include source
 codes for your xsp and provide more information about how
 you actually pass your parameters.
 
 cocoon itself does not differentiate between post and get
 request methods neither does it store values of previous
 request, so I would guess you're either doing something wrong
 when reading out the parameters ore it's a browser cache issue.
 
 cheers,
 Johannes
 
 Anna Bikkina wrote:
 
 Can anyone provide input on this problem? I still cannot get the
 post/get methods working as they should.
 
 Thanks,
 Anna.
 
 On Wed, 2004-11-17 at 16:53, Anna Bikkina wrote:
   
 
 I think cocoon is somewhere internally storing my previous request
 values because before submit I called a javascript and checked the
 variables entered in page2 it displays right variables but then it still
 posts page1 variables and this is happening only when the submit type of
 form in page2 is post. How can I get rid of this?
 
 
 On Wed, 2004-11-17 at 16:32, Anna Bikkina wrote:
 
 
 Hi,
 
 I have a wierd problem using META tab in HEAD of my HTML in cocoon
 portal. May be this is a html question more than a portal question. Can
 someone please help me solve this one.. I have been working on this for
 more than a week now.
 
 I have a html form in a cocoon coplet(page1.xsp). When I submit the form
 it goes to wait.xsp which just displays a animated gif saying searching
 results . Wait.xsp  has 
 
 meta http-equiv=refresh 
 content=1;url=page1.xsp?param1=xxparam2=YY
 
 where the url in content  contains all the request parameters that come
 to wait.xsp.
 
 Now this one goes to the same sitemap match as page1  and the sitemap
 directs it to page2 depending on some conditions page2 displays results
 and also has  almost the same html form as in page1. When I submit the
 form in page2 it submits details as in page1 when the method type =
 post when the method type = get it works the way it should by
 posting parameters in page2 .Not sure what 

RE: Deployment of Cocoon apps. Best practices?

2004-11-23 Thread Eric Jacob
Hi André,

I'm successfully using Maven to build and deploy my Cocoon projects.

Here how I manage it:

- Rename blocks.properties and build.properties to local.blocks.properties
and local.build.properties;
- Uncomment all unused stuff;
- Build Cocoon;
- Copy all the generated jars to your local Maven repository (in my case, I
use maven-proxy);
- Copy the webapp folder (in build/webapp) to my Maven working dir
(src/webapp), except the jars.
- Create a project descriptor extending cocoon-2.1.6.xml.

I've put in attachment a Maven project descriptor for building a minimal
Cocoon webapp. Here my directory structure:

-root/
 |-cocoon-2.1.6.xml
 |-projectA/
   |-src/
 |-conf/
 |-java/
 |-test/
 |-webapp/
   |-...

Hope this help.

Eric

-Original Message-
From: Bent André Solheim [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 22, 2004 1:06 PM
To: Cocoon Users
Subject: Deployment of Cocoon apps. Best practices?

Hi Cocoon users!

I have been developing an application for document presentation based
on cocoon, and time is coming for full scale test deployment.

The way I have developed the application is that I have an own project
for the cocoon instance tailored for our application needs. Here I
maintain the main sitemap, the dependencies (jars) for cocoon to work
and other cocoon files. When building a war file of this project I get
a functioning cocoon application that can be deployed to an
application server, but with no functional pipelines. Lets call this
project A.

I also have a project B (a cocoon application) where I maintain a sub
sitemap, a custom generator and a custom transformer, and some other
stuff. In addition I have a project C where we maintain a bunch of
xslt transformations that are used across our enterprise. One
requirement is that it must be possible to deploy projects B and C
separately from project A. This is because there will pop up projects
similar to project B at a later time, and we must be able to deploy
them separately from the cocoon instance.

My questions are; 
- How do you other cocoon users deploy your applications? 
- How do you deal with several cocoon applications using the same
cocoon instance when deploying?
- Would it be possible for cocoon to use the transformations in
project C if I deployed them as a jar file?
- How/where do you maintain your mount-table.xml file?
- Are there people using cocoon and maven? How do you guys deploy?
(this is of particular interest to me, as we use maven for all our
projects).

That's a lot of questions for one posting, but I hope this can develop
into a discussion on best practices for cocoon application deployment
with ant or maven or other similar tools.


Best regards,
Bent Andre Solheim

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

?xml version=1.0 encoding=ISO-8859-1?

!--
Document   : cocoon-2.1.6.xml
Created on : November 23, 2004, 9:19 PM
Author : Eric Jacob
Description:
Maven Project Descriptor for Cocoon.
--

project

  pomVersion3/pomVersion
  
  dependencies
dependency
  groupIdaltrmi/groupId
  artifactIdaltrmi-common/artifactId
  version0.9.2/version
  typejar/type
  properties
war.bundletrue/war.bundle
  /properties
/dependency
dependency
  groupIdaltrmi/groupId
  artifactIdaltrmi-registry/artifactId
  version0.9.2/version
  typejar/type
  properties
war.bundletrue/war.bundle
  /properties
/dependency
dependency
  groupIdaltrmi/groupId
  artifactIdaltrmi-server-impl/artifactId
  version0.9.2/version
  typejar/type
  properties
war.bundletrue/war.bundle
  /properties
/dependency
dependency
  groupIdaltrmi/groupId
  artifactIdaltrmi-server-interfaces/artifactId
  version0.9.2/version
  typejar/type
  properties
war.bundletrue/war.bundle
  /properties
/dependency
dependency
  groupIdavalon-framework/groupId
  artifactIdavalon-framework-api/artifactId
  version4.1.5/version
  typejar/type
  properties
 war.bundletrue/war.bundle
  /properties
/dependency
dependency
  groupIdavalon-framework/groupId
  artifactIdavalon-framework-impl/artifactId
  version4.1.5/version
  typejar/type
  properties
war.bundletrue/war.bundle
  /properties
/dependency
dependency
  groupIdbcel/groupId
  artifactIdbcel/artifactId
  version20040329/version
  typejar/type
  properties
war.bundletrue/war.bundle
  /properties
/dependency
dependency
  groupIdcocoon/groupId
  artifactIdcocoon/artifactId
  version2.1.6/version
  typejar/type
  properties
war.bundletrue/war.bundle
  /properties
/dependency
dependency
  groupIdcommons-cli/groupId
  

RE: Deployment of Cocoon apps. Best practices?

2004-11-23 Thread Eric Jacob
Hi André,

I'll send you my entire project offline (zipped files).

Thanks,

Eric

-Original Message-
From: Eric Jacob [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 23, 2004 2:33 PM
To: [EMAIL PROTECTED]
Subject: RE: Deployment of Cocoon apps. Best practices?

Hi André,

I'm successfully using Maven to build and deploy my Cocoon projects.

Here how I manage it:

- Rename blocks.properties and build.properties to local.blocks.properties
and local.build.properties;
- Uncomment all unused stuff;
- Build Cocoon;
- Copy all the generated jars to your local Maven repository (in my case, I
use maven-proxy);
- Copy the webapp folder (in build/webapp) to my Maven working dir
(src/webapp), except the jars.
- Create a project descriptor extending cocoon-2.1.6.xml.

I've put in attachment a Maven project descriptor for building a minimal
Cocoon webapp. Here my directory structure:

-root/
 |-cocoon-2.1.6.xml
 |-projectA/
   |-src/
 |-conf/
 |-java/
 |-test/
 |-webapp/
   |-...

Hope this help.

Eric

-Original Message-
From: Bent André Solheim [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 22, 2004 1:06 PM
To: Cocoon Users
Subject: Deployment of Cocoon apps. Best practices?

Hi Cocoon users!

I have been developing an application for document presentation based
on cocoon, and time is coming for full scale test deployment.

The way I have developed the application is that I have an own project
for the cocoon instance tailored for our application needs. Here I
maintain the main sitemap, the dependencies (jars) for cocoon to work
and other cocoon files. When building a war file of this project I get
a functioning cocoon application that can be deployed to an
application server, but with no functional pipelines. Lets call this
project A.

I also have a project B (a cocoon application) where I maintain a sub
sitemap, a custom generator and a custom transformer, and some other
stuff. In addition I have a project C where we maintain a bunch of
xslt transformations that are used across our enterprise. One
requirement is that it must be possible to deploy projects B and C
separately from project A. This is because there will pop up projects
similar to project B at a later time, and we must be able to deploy
them separately from the cocoon instance.

My questions are; 
- How do you other cocoon users deploy your applications? 
- How do you deal with several cocoon applications using the same
cocoon instance when deploying?
- Would it be possible for cocoon to use the transformations in
project C if I deployed them as a jar file?
- How/where do you maintain your mount-table.xml file?
- Are there people using cocoon and maven? How do you guys deploy?
(this is of particular interest to me, as we use maven for all our
projects).

That's a lot of questions for one posting, but I hope this can develop
into a discussion on best practices for cocoon application deployment
with ant or maven or other similar tools.


Best regards,
Bent Andre Solheim

-
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 portal and META Tag

2004-11-23 Thread Ralph Goers
I'm a little confused by this.  Is this the output from a cocoon portlet?
Portals generally only want portlets to emit stuff that goes within body
tags.  I'm pretty sure the portal will generate its own head tags so
yours would be another set.


Anna Bikkina said:

 head tag in wait.xsp


 head

 String requestattr = 0;url=portal?nowait=true;
 Enumeration attrnames = request.getParameterNames();
 while(attrnames.hasMoreElements()) {
 String attrname = (String)attrnames.nextElement();
 if(!attrname.equals(nowait)) {
   String attrvalue = request.getParameter(attrname);
   requestattr = requestattr +  + attrname + = + attrvalue;
   }
 }
 meta http-equiv=refresh 
 xsp:attribute
 name=contentxsp:exprrequestattr/xsp:expr/xsp:attribute
 /meta
 /head

   !-- SAMPLE OC  SEARCH IN SITEMAP --
map:match pattern=sampleoc.xsp
   map:select type=request-parameter
   map:parameter name=parameter-name value=nowait/
   map:when test=false
 map:generate type=serverpages src=wait.xsp /
   /map:when
   map:otherwise
 map:act type=get-sample
   map:parameter name=sample 
 value={request-param:sampleoc}/
   map:generate type=serverpages 
 src=traderocresult.xsp/

   /map:act

   /map:otherwise
   /map:select

  map:transform/
  map:serialize/
/map:match
!-- END OF SAMPLE OC SEARCH--


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



RE: Deployment of Cocoon apps. Best practices?

2004-11-23 Thread Ralph Goers
I also use maven. These are the steps I follow:
1. Build Cocoon with only the desired properties and blocks. Use
./build.sh war
2. Copy the generated war file to the maven repository.
3. In the project directory run maven war:install using the attached
maven.xml in the project directory.  It unwars the cocoon war, patches the
sitemap and cocoon.xconf as necessary and then adds our stuff to the war.

Note that this means that the vast majority of the jars you will be using
will be brought in via the cocoon war file, dramatically reducing the
number of dependencies that have to be changed with each cocoon update.

Ralph


Eric Jacob said:
 Hi André,

 I'm successfully using Maven to build and deploy my Cocoon projects.

 Here how I manage it:

 - Rename blocks.properties and build.properties to local.blocks.properties
 and local.build.properties;
 - Uncomment all unused stuff;
 - Build Cocoon;
 - Copy all the generated jars to your local Maven repository (in my case,
 I
 use maven-proxy);
 - Copy the webapp folder (in build/webapp) to my Maven working dir
 (src/webapp), except the jars.
 - Create a project descriptor extending cocoon-2.1.6.xml.

 I've put in attachment a Maven project descriptor for building a minimal
 Cocoon webapp. Here my directory structure:

 -root/
  |-cocoon-2.1.6.xml
  |-projectA/
|-src/
  |-conf/
  |-java/
  |-test/
  |-webapp/
|-...

 Hope this help.

 Eric
?xml version=1.0 encoding=ISO-8859-1?
project default=war
  xmlns:ant=jelly:ant
  xmlns:m=jelly:maven
  xmlns:u=jelly:util
  xmlns:j=jelly:core

  goal name=install
attainGoal name=war:install/
  /goal

  goal name=patch
ant:taskdef name=xpatch classname=XConfToolTask
  classpathref=maven.dependency.classpath/
echococoon.xconf: ${cocoon.xconf}/echo
echovar(maven.src.dir)/config: ${maven.src.dir}/config/echo
echomaven.dependency.classpath: ${maven.dependency.classpath}/echo
j:set var=banking value=true/
ant:xpatch file=${cocoon.xconf}
  srcdir=${maven.src.dir}/config
  includes=**/*.xconf
  addComments=true
${systemScope.setProperty('javax.xml.transform.TransformerFactory',
  'org.apache.xalan.processor.TransformerFactoryImpl')}
/ant:xpatch
echositemap.xmap: ${cocoon.sitemap}/echo
ant:xpatch file=${cocoon.sitemap}
  srcdir=${maven.src.dir}/config
  includes=**/*.xmap
  addComments=true
${systemScope.setProperty('javax.xml.transform.TransformerFactory',
  'org.apache.xalan.processor.TransformerFactoryImpl')}
/ant:xpatch
  /goal

  goal name=jboss-patch
ant:taskdef name=xpatch classname=XConfToolTask
  classpathref=maven.dependency.classpath/
echococoon.xconf: ${cocoon.xconf}/echo
echovar(maven.src.dir)/config: ${maven.src.dir}/jboss-config/echo
j:set var=banking value=true/
ant:xpatch file=${cocoon.xconf}
  srcdir=${maven.src.dir}/jboss-config
  includes=**/*.xconf
  addComments=true
${systemScope.setProperty('javax.xml.transform.TransformerFactory',
  'org.apache.xalan.processor.TransformerFactoryImpl')}
/ant:xpatch
echositemap.xmap: ${cocoon.sitemap}/echo
ant:xpatch file=${cocoon.sitemap}
  srcdir=${maven.src.dir}/jboss-config
  includes=**/*.xmap
  addComments=true
${systemScope.setProperty('javax.xml.transform.TransformerFactory',
  'org.apache.xalan.processor.TransformerFactoryImpl')}
/ant:xpatch
  /goal

  preGoal name=war:webapp
!-- clean up --
delete file=${cocoon.xconf}/
delete file=${lifecycle.container.config}/
delete file=${cocoon.banking.sitemap} verbose=true/

j:set var=includeLifecycleConfig
  value=${context.getVariable('lifecycle.config.files.include')}/
j:if test=${includeLifecycleConfig == 'false'}
  j:set var=maven.war.src.excludes value=**/${lifecycle.config.file.name}/
/j:if

j:forEach var=dep items=${pom.dependencies}
  j:if test=${dep.getArtifactId().equals('cocoonwar')}
j:if test=${dep.getType().equals('war')}
  j:set var=cocoonWar
value=${maven.repo.local}/cocoon/wars/cocoonwar-${dep.getVersion()}.war/

  j:set var=unwarCocoon value=${context.getVariable('cocoon.war.unwar')}/
  unwar src=${cocoonWar} dest=${maven.build.dir}/${pom.artifactId}
patternset
  exclude name=**/*.mf/
  exclude name=**/*.MF/
  exclude name=**/WEB-INF/web.xml/
/patternset
echounwarCocoon: ${unwarCocoon}/echo
j:if test=${unwarCocoon == 'false'}
  echoExcluding jars/echo
  patternset
exclude name=**/*.jar/
exclude name=**/*.mf/
exclude name=**/*.MF/
exclude name=**/WEB-INF/web.xml/
  /patternset
/j:if

Nullpointer exeption in jx templates

2004-11-23 Thread Thorsten Mauch
Hi
in my logs i find from time to time error messages like:
ERROR   (2004-11-23) 22:45.17:627   [access]
(/abnehmen/kalorien-grundumsatz.html) Ajp13Processor[8009][7]/CocoonServlet:
Internal Cocoon Problem
org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
file:/opt/jakarta-tomcat-4.1.27-LE-jdk14/webapps/abnehmen/abnehmen/jx/kalori
engrundumsatz.xml:26:59:java.lang.NullPointerException

I have not idea what the problem is. In my testenvironment i never saw this
error. How can 
I figure out what might be the source of this error ?

What is the meaning of 26:59 ? is this related to the line ?

Thx Thorsten

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



[CForms] booleanfield, on-value-change = display form fields

2004-11-23 Thread Markus Heussen
I know how to display form fields depending on an option selected in a 
dropdown list. But if I try to do the same using a booleanfield I get a 
ClassCastException.

Anyone there who can explain me or give some code examples about 
displaying form fields after checking a checkbox?

Many thanks!
Markus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Nullpointer exeption in jx templates

2004-11-23 Thread Joerg Heinicke
On 23.11.2004 22:57, Thorsten Mauch wrote:
What is the meaning of 26:59 ? is this related to the line ?
line 26, column 59.
Joerg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [CForms] booleanfield, on-value-change = display form fields

2004-11-23 Thread Joerg Heinicke
On 24.11.2004 00:14, Markus Heussen wrote:
I know how to display form fields depending on an option selected in a 
dropdown list. But if I try to do the same using a booleanfield I get a 
ClassCastException.
Can you send the beginning of the stack trace?
Joerg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Deployment of Cocoon apps. Best practices?

2004-11-23 Thread David Leangen

I am interested in this, since I am pretty much at the same point. So, I am
very curious...

With your approaches to managing the apps, doesn't this mean, though, that
you pretty much have to manage some things manually? I mean, what do you do
if there is a new or updated dependency with Cocoon, or if for some reason
JARs are stored in a different location?

Also, do you use the latest CVS version or do you use a more stable release?

Eric's approach seems to depend less on the structure of how Cocoon is
built, but seems to require the developer to manually track the JARs.
Ralph's approach solves the problem of manually tracking the JARs... but it
seems that it depends on how the Cocoon project is structured. Or am I
mistaken?


I guess what I'm really interested in is completely automating the build, so
it works without any intervention even when Cocoon is updated. Is this even
possible, do you think?


Thanks!
Dave



 -Original Message-
 From: Ralph Goers [mailto:[EMAIL PROTECTED]
 Sent: 24 November 2004 5:55
 To: [EMAIL PROTECTED]
 Subject: RE: Deployment of Cocoon apps. Best practices?


 I also use maven. These are the steps I follow:
 1. Build Cocoon with only the desired properties and blocks. Use
 ./build.sh war
 2. Copy the generated war file to the maven repository.
 3. In the project directory run maven war:install using the attached
 maven.xml in the project directory.  It unwars the cocoon war, patches the
 sitemap and cocoon.xconf as necessary and then adds our stuff to the war.

 Note that this means that the vast majority of the jars you will be using
 will be brought in via the cocoon war file, dramatically reducing the
 number of dependencies that have to be changed with each cocoon update.

 Ralph


 Eric Jacob said:
  Hi André,
 
  I'm successfully using Maven to build and deploy my Cocoon projects.
 
  Here how I manage it:
 
  - Rename blocks.properties and build.properties to
 local.blocks.properties
  and local.build.properties;
  - Uncomment all unused stuff;
  - Build Cocoon;
  - Copy all the generated jars to your local Maven repository
 (in my case,
  I
  use maven-proxy);
  - Copy the webapp folder (in build/webapp) to my Maven working dir
  (src/webapp), except the jars.
  - Create a project descriptor extending cocoon-2.1.6.xml.
 
  I've put in attachment a Maven project descriptor for building a minimal
  Cocoon webapp. Here my directory structure:
 
  -root/
   |-cocoon-2.1.6.xml
   |-projectA/
 |-src/
   |-conf/
   |-java/
   |-test/
   |-webapp/
 |-...
 
  Hope this help.
 
  Eric



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



RE: Deployment of Cocoon apps. Best practices?

2004-11-23 Thread Frangos, Nick (SAPOL)
I am at a stage where I will need to deploy some applications under Cocoon.
It would be nice to be able to bundle up the applications into wars. The war
would contain the application sitemap, required jars, xslt, images, etc.
Then copy the war under cocoon and have cocoon expand the war. Is this
possible?.

Also how do you get around the requirement for application A and application
B requiring different versions of a jar, say foo1.jar and foo2.jar ?. At the
moment I copy the jars into the WEB-INF/lib dir under cocoon, but this means
that all applications can see that jar.


Nick Frangos

-Original Message-
From: Ralph Goers [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 24 November 2004 7:25 AM
To: [EMAIL PROTECTED]
Subject: RE: Deployment of Cocoon apps. Best practices?

I also use maven. These are the steps I follow:
1. Build Cocoon with only the desired properties and blocks. Use
./build.sh war
2. Copy the generated war file to the maven repository.
3. In the project directory run maven war:install using the attached
maven.xml in the project directory.  It unwars the cocoon war, patches the
sitemap and cocoon.xconf as necessary and then adds our stuff to the war.

Note that this means that the vast majority of the jars you will be using
will be brought in via the cocoon war file, dramatically reducing the
number of dependencies that have to be changed with each cocoon update.

Ralph


Eric Jacob said:
 Hi André,

 I'm successfully using Maven to build and deploy my Cocoon projects.

 Here how I manage it:

 - Rename blocks.properties and build.properties to local.blocks.properties
 and local.build.properties;
 - Uncomment all unused stuff;
 - Build Cocoon;
 - Copy all the generated jars to your local Maven repository (in my case,
 I
 use maven-proxy);
 - Copy the webapp folder (in build/webapp) to my Maven working dir
 (src/webapp), except the jars.
 - Create a project descriptor extending cocoon-2.1.6.xml.

 I've put in attachment a Maven project descriptor for building a minimal
 Cocoon webapp. Here my directory structure:

 -root/
  |-cocoon-2.1.6.xml
  |-projectA/
|-src/
  |-conf/
  |-java/
  |-test/
  |-webapp/
|-...

 Hope this help.

 Eric

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



Re: Deployment of Cocoon apps. Best practices?

2004-11-23 Thread Ralph Goers




David Leangen wrote:

  Hi, Ralph!

Thanks for your quick and helpful reply! :o)

  
  
What do you mean? Where else would they be but WEB-INF/lib? Are
you meaning when they are deployed?

  
  
Oh, ok, I think I see what you mean. So you're essentially obtaining a
compiled webapp, so we can pretty much safely assume that all the JARs will
always be in WEB-INF/lib...


  
  

  Also, do you use the latest CVS version or do you use a more stable
release?
  

I use the latest stable release and apply my own patches as necessary.
I actually put the cocoon src zip file in the maven repository and put
patch files there as well so that others could build what is in production
if they needed to.

  
  
Sorry if this is a silly question, but what do you mean by "patch files"?
  

If you look at the maven.xml file I attached to an earlier response you
will see an xpatch task defined. This uses Cocoon's XConfToolTask to
patch the root sitemap.xmap, cocoon.xconf, and any other XML files I
might want to "patch". If you look at the blocks, many of them have a
conf directory that has patch files in them. I believe this is
documented on the wiki. Typically, I only modify the root sitemap to
remove a couple of pipelines and to patch in decent pool values.

  

  
  

  Eric's approach seems to depend less on the structure of how Cocoon
is built, but seems to require the developer to manually track the JARs.
Ralph's approach solves the problem of manually tracking the JARs...
but it seems that it depends on how the Cocoon project is structured.
Or am I mistaken?
  

You are correct. I initially did what Eric is doing but found that it was
a real pain to upgrade all the cocoon blocks and dependencies with
each release.  I also assume that Cocoon has been tested with the
jars it ships with so using anything else, in my mind, is not supported.

  
  
Ok, that makes sense. Thanks for sharing this with me.


  
  

  I guess what I'm really interested in is completely automating
the build, so it works without any intervention even when Cocoon
is updated. Is this even possible, do you think?
  

Well, I build cocoon, put the war file, cocoon.jar, cocoon-testcase.jar
and cocoon-anttask (I build that from the anttask directory) in the
maven repository and then update a couple of files with the new release
umber and I am done.  I only put cocoon.jar and cocoon-testcase there
because I have custom components that require them at compile time.
They are not used when building the webapp.

  
  
Ok, I see.

What about your xml (or xdoc or whatever) files + stylesheets? I suppose
that you probably have various projects going on that use Cocoon... how do
you manage those projects and merge them into your Cocoon build?
  

They all use the same Cocoon war. Each project has a file structure
like:

project
- maven.xml
- project.xml
- project.properties
- config
 - various patch files for the xpatch task
- src
 - java
 - java source subdirectories
 - webapp
 - WEB-INF
 - web.xml (replacement for Cocoon's)
 - directory named after project
 - sitemap.xmap
 - project.roles (actually, also named after the project).
 - project subdirectories, each with their own sitemap.

Maven unwars the cocoon war file into the target directory, compiles
any java source, performs the patches in the config directory, copies
the web.xml and the project directory (and subdirectories) and then
creates a new war file. This happens for every project, if we want a
separate webapp. To merge them we would need a project with multiple
project subdirectories. Most everything else would be the same.


  

Thanks for the advice!
Dave

BTW, is there a reason you sent this off-list? I think your advice would be
useful for others, too, if you're willing to share.
  

Yeah. For some reason many of the emails I just do "reply" to from this
list are directed to people, not the list. That should never happen,
IMO. Sometimes I don't notice. As a rule I never try to respond off
the list.

Ralph




Re: Reliable XML/XSL editors for Cocoon development ?

2004-11-23 Thread Derek Hohls
My 2c is that the *designers* should not be let loose
anywhere near Cocoon - it is a development tool.  The
designers could be given template pages, for example,
to work with.  Depending on the complexities of your 
operation, you can easily get away with:

sitemap match 
  - generator(read file or use SQL) 
- transformer

Essentially a three step approach.

Yes, flow can be added if more complex logic is needed;
but again, Java is purely optional.  Flowscript is based on
Javascript, which even page designers should know ;-)
I can only say I have been using Cocoon for about 5 years
and the amount of Java I have written has been really
minimal (mostly with the now little-used XSP).

Remember: Cocoon has the power under the hood but
for the time when you do not need it, the elegance and 
usability of the sitemap is sufficient.   KISS.


 [EMAIL PROTECTED] 2004/11/23 04:36:21 PM 
Hello

We are using Dreamweaver for our current websites design, producing
xhtml pages - templates - containing custom tags that once hosted on
our server are being replaced on the fly by database data, which is a
very classic setup, I guess :)

We'll be moving to a Cocoon based backend soon, mostly for enterprise
needs (i.e we need to host and access various SOAP web-services - Java
behind -, and exchange XML flows with our clients, which are in the
publishing industry, I assume Cocoon is the right choice), but I'm
currently trying to figure out if Cocoon can be a reliable solution to
manage several web sites (I do not mean web applications here, only
sites, like small sites based on a small database) : afaik, you have
two popular methods to output website content, XSP versus
Flowscript+JX, which is fine but both are very code-based, I mean
websites designers are not Java or XML experts (or both).

My problem is that our designers - they did spend several days
evaluating Cocoon - are afraid to move from our current DW+PHP
backend, because they think the whole sitemap  pattern hit  xsp or
flowscript + jx  transformer  result is just too obscure and
difficult to dig into, ie when editing a website you have to remember
the whole sitemap schema, especially when using aggregates. I also
don't understand the right choice between having a mega-huge xsl sheet
able to transform every page on our site based on call-templates or
one xsl per page transformation path. Plus they told me XSP was
similar to our PHP approach but was an obsolete (?) framework, and
Flowscripts look nice but require a huge Java knowledge. What I am
looking for is an editor being able to handle Cocoon-based websites :
for example, something being able to traverse a sitemap, find all
matching patterns, build a tree of patterns, output the resulting xml
flows (from xsp or jx sources), and visually edit elements of the xsl
sheet. Dreamweaver has no clue about XML/XSL editing, XMLSpy has no
clue about visual editing, Eclipse has never been a web editor, and
Cocoon Wiki is dry on visual editors reviews.

What are you guys using when dealing with 'pure' website design and
management under Cocoon ? Thanks for any input :)

-
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: Using htmlArea 'output' with SVG

2004-11-23 Thread Derek Hohls
Ugo

No, I don't want to make it more complicated than
it needs to be - but perhaps because it seems obscure
then I assume it's complex.

I agree that storing well-formed XML data is the
ideal here... the solution you propose is one which
(a) works on a single field, and 
(b) stores that field  as a CLOB in a RDB
Right?   I am trying to solve the problem of having
the data from a number of CForm fields stored back into
an XML file using the existing CForms framework.  So, 
a simple (to me) solution is one which identifies where 
and how I insert the code-call you have written into the 
exisiting framework. To keep it really simple, you could 
refer to the Cocoon sample that uses (or could use) 
htmlArea ;-)  e.g.

samples/blocks/forms/form2xml.flowor
samples/blocks/forms/htmlarea

Thanks
Derek 

 [EMAIL PROTECTED] 2004/11/23 07:52:24 PM 
Il giorno 23/nov/04, alle 14:39, Derek Hohls ha scritto:

 Well, all this may be clear to you... but not to me :{

I'm not saying that it should be crystal clear to you, just that you 
should not try to make it more complex than it is :)

 Where I am trying to get to is not to deal with single
 bits of htmlArea text, but with an entire file created
 using a Cform.  Are you proposing that each field containing
 htmlArea text must be intercepted and processed before
 the form data is stored?

Yes. It would be better if you stored well-formed XML data by cleaning

it once rather than every time you read it back.

 I am not sure why you have created the dom variable
 in your script below, or what you would do with it.

My method returns an org.w3c.dom.Document, i.e. an in-memory 
representation of a well-formed XML document. What you want to do with

it is up to you. In the application from which I excerpted that class,

I serialize it to a String and store it in a CLOB in a relational 
database.


 There are likely to be a number of users, all creating and
 drawing data from different files via CForms; is this
 likely to be a problem?

If contention is a problem, you can always pool instances of XML 
parsers, or use the parser provided by Avalon that is already pooled 
and made available to Cocoon components. Since I usually tend to stay 
away from Avalon code, I am sorry but I cannot help you with this.

Ugo

-- 
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: Using htmlArea 'output' with SVG

2004-11-23 Thread Derek Hohls
Helma

Isn't the problem though, that the htmlAtrea strings
cannot be post-processed in another stylesheet - one
that outputs XML and not HTML?

Derek

 [EMAIL PROTECTED] 2004/11/23 04:09:08 PM 
Derek,

I'm currently working on updating the HTMLarea sample to 
1. work in tables in IE6
2. use Bruno's HtmlCleanerConvertor
3. output html-ized data, rather than raw (i.e. as string)

for 3. I currently use a simple XSL stylesheet that matches htmlarea
tags
and displays them with disable-output-escaping=yes. If anyone can
come up
with a better solution or modifies Ugo's HTMLparser, please do so.

For now Reinhard is looking things over.

Bye, Helma


 -Original Message-
 From: Derek Hohls [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, 23 November, 2004 14:39
 To: [EMAIL PROTECTED] 
 Subject: Re: Using htmlArea 'output' with SVG
 
 
 Ugo
 
 Well, all this may be clear to you... but not to me :{
 Where I am trying to get to is not to deal with single
 bits of htmlArea text, but with an entire file created
 using a Cform.  Are you proposing that each field containing 
 htmlArea text must be intercepted and processed before 
 the form data is stored?  Or is when you read it back?
 I am not sure why you have created the dom variable
 in your script below, or what you would do with it.
 
 There are likely to be a number of users, all creating and 
 drawing data from different files via CForms; is this likely 
 to be a problem?
 
 Derek
 
  [EMAIL PROTECTED] 2004/11/23 03:10:59 PM 
 Il giorno 23/nov/04, alle 13:11, Derek Hohls ha scritto:
 
  OK - so what needs to be done to integrate this into a
  Cocoon application?  I assume this is a page generator
  of some sort (or is a new transformer?), but I have not customized

  Cocoon in this way before.  Pointers to next steps would be 
  welcome...!
 
 This is just a plain, old Java object with a single public static 
 method. I don't know why you always manage to make things harder than

 they are ;-)
 
 You can call it from flowscript like this:
 
 var dom = HTMLParser.parse(form.lookupWidget(/field).value;
 
 Of course, being a simple Java class, you can call it from 
 Java code as
 
 well.
 
 The only problem it has, AFAIK, is that it defines a single static 
 instance of an XML parser, which is not threadsafe, so the only
method
 
 that uses it is synchronized. This is not going to scale, of course,

 but it is not a problem unless you need to concurrently process a lot

 of HTML strings. And it has an explicit dependency on Xerces 
 instead of
 
 using JAXP. As far as I can remember, I had some problems 
 with JAXP and
 
 Neko, so I made it like that, but I can't remember the details at the

 moment.
 
   Ugo
 
 -- 
 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] 
 

-
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: Using htmlArea 'output' with SVG

2004-11-23 Thread H . vanderLinden
 Helma
 
 Isn't the problem though, that the htmlAtrea strings
 cannot be post-processed in another stylesheet - one
 that outputs XML and not HTML?

I suppose Bruno's HTMLCleaner takes care of that. It cleans up the HTML
output of HTMLarea and put a root element around it. Which would give you a
well-formed XML fragment in my view. I haven't looked at it that thoroughly,
but Bruno's the expert on this. ;-)

Bye, Helma

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



Re: Problems with JSR-168 portlets over Portal Engine.

2004-11-23 Thread Ralph Goers
I have not looked at item 1 yet. I will try to over my Thanksgiving 
weekend. 

The specific problem in item 2 was fixed and is in 2.1.6.  However, the 
support for portlet preferences is not in 2.1.6.  I just checked that 
into the 2.2 branch today.  I am waiting a couple of days to see if I 
get any negative responses to a post on the dev list.  I might as well 
post the issue here as well.

As you probably know, the Cocoon Portal has several configuration files. 
Of particular interest to me were the copletinstancedata and layout 
portal.xml files.  In determining what to do about storing JSR-168 
prefernces it seemed the obvious place to store them would be in the 
copletinstancedata portal.xml file, because this file was already being 
stored on a per-user basis and contained all the Cocoon portlet 
definitions, including the JSR-168 portlets.  Coding this wasn't much of 
a problem, however I soon discovered that the files Cocoon was 
generating (via Castor) could not be re-read by Cocoon.  As a 
consequence, I had to change the mapping files (for Castor) as well as 
some code to get these files to be written out properly.  However, I 
cannot guarantee that they are compatible with files being written by 
2.1.6 and previous releases.  Therefore, I am somewhat concerned about 
checking this into the 2.1 branch on the off chance that the files are 
being used by someone for some purpose, although I can't imagine for what.

Ralph
[EMAIL PROTECTED] wrote:
Hi, I need help with Portal Engine. I have two problems with JSR-168
portlets.
--
1. I'm trying to use the RequestDispatcher  from JSR-168 portlets using the
code below:
  PortletRequestDispatcher rd =
getPortletContext().getRequestDispatcher(/WEB-INF/page.htm);
  try {
   rd.include(request, response);
  } catch (PortletException pe) {}
But I always get the following error message:
  ERROR   (2004-11-09) 12:58.07:864   [portal]
(/webapp/samples/blocks/portal/portal) http-8080-Processor24/LoggerImpl:
PortletInvokerImpl.action() - Unable to find RequestDispatcher.
Anybody knows why it doesn't work? Thanks in advance.
--
2. I can´t update programmatically a JSR-168 portlet preference using code
like this:
  PortletPreferences PP = request.getPreferences();
  try {
   PP.setValue(preference,value);
   PP.store();
  } catch(ReadOnlyException roe) {} catch(ValidatorException ve) {}
It seems to be a problem with the preferences validator, because I always
get this message:
ERROR   (2004-11-09) 13:17.47:030   [portal]
(/webapp/samples/blocks/portal/portal)
http-8080-Processor23/PortletPortalManager: Error during processing of
portlet action.
java.lang.IllegalStateException: Portlet class loader not yet available to
load preferences validator.
 at
org.apache.cocoon.portal.pluto.om.common.PreferenceSetImpl.getPreferencesValidator(PreferenceSetImpl.java:59)
 at
org.apache.pluto.core.impl.PortletPreferencesImpl.store(PortletPreferencesImpl.java:291)
 at
com.soluzionasf.definete.portlet.TestPortlet.processAction(TestPortlet.java:150)
 at
org.apache.cocoon.portal.pluto.factory.LocalPortletInvokerImpl.action(LocalPortletInvokerImpl.java:129)
 at
org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContainerImpl.java:152)
 at
org.apache.cocoon.portal.impl.PortletPortalManager.process(PortletPortalManager.java:215)
 at
org.apache.cocoon.portal.generation.PortalGenerator.generate(PortalGenerator.java:58)
 at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:545)
 at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:173)
 at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:490)
 at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
 at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
 at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:138)
 at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
 at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
 at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
 at

RE: Using htmlArea 'output' with SVG

2004-11-23 Thread Derek Hohls
Brunor - I thought Ugo was the once who came up 
with the code we were talking about - its called HTMLparser
(was attached to a previous email) ... what is the difference
between these two??

 [EMAIL PROTECTED] 2004/11/24 08:33:27 AM 
 Helma
 
 Isn't the problem though, that the htmlAtrea strings
 cannot be post-processed in another stylesheet - one
 that outputs XML and not HTML?

I suppose Bruno's HTMLCleaner takes care of that. It cleans up the
HTML
output of HTMLarea and put a root element around it. Which would give
you a
well-formed XML fragment in my view. I haven't looked at it that
thoroughly,
but Bruno's the expert on this. ;-)

Bye, Helma

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