AW: woody + dynamic document generation

2003-12-10 Thread Ulrich, Dominik
Hi
thanks for your answer!
My concern is not primary about performance,
because documents are generated only a few times per week.
And performance is pretty ok, since the cgi script does basicly only
start some external programs to convert the document.
Currently I'm calling saxon or xalan with this script, because
performance was better, than calling it from a pipeline,
but I'planning to reimplement these tasks into one pipeline.

I just thought, that there could be a nicer solutions, then doing it with the
script. Fop is out of question, because I'm instructed to take a commercial
converter for pdf conversion, because of hyphenation, orphans,
widows etc. in then output.

Regards Dominik



-Ursprüngliche Nachricht-
Von: John Austin [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 9. Dezember 2003 18:49
An: [EMAIL PROTECTED]
Betreff: Re: woody + dynamic document generation



Ulrich, Dominik [EMAIL PROTECTED] wrote:
 Hello everyone!
 
 I'm using cocoon currently for a few weeks now.
 My goal is to build a web application, which dynamicly creates
 documents (xml - pdf,rtf,html) for my company. These documents are very large
 and need about half an hour to be created (pdf).

There are a few things you can do to address performance of the FOP
Serializer in particular and Cocoon in general.

1) Check whether your JVM is running the -server version of the JVM.
Benchmark both versions (-client and -server) and choose the one that
works best for you. The -server one works best for my PDF documents but
is not the best choice in all cases. It does not pay off for building
Cocoon or Fop using ant. This is an option that has to be coded when you
start the Servlet container (Jetty, Tomcat, et. al.). It is NOT the
default for all containers, Cocoon's bundled Jetty is one example
(see cocoon.sh for example).

2) Make sure you give it enough memory.
   i) Watch for memory exhaustion on the physical machine
  e.g. run /usr/bin/top on Linux shows very little free
  memory, kswapd runs a lot, your java process using lots of memory
  + Fix this by adding RAM to the system
   ii) Don't overdo worrying about (iii) as (i) is more important
   iii) You can control the max and starting heap sizes for Sun's JVM
  by specifying -Xmxvalue1m -Xmsvalue2m to cut down some garbage
  collection and heap expansion. 
Value1 is some big number approximating the observed requirement
of your workload. 
Value2 can be some number up to value1 chosen to reduce the
overhead of a continually growing heap.

3) If possible, delegate work to other machines. If you have spare
capacity, redirect large workloads to a dedicated machine or machines.
A dedicated server running 'Jetty' is trivial to set up.

4) If necessary, generate the Formatting Objects file on Cocoon and use
FOP stand-alone to create your PDF. This goes against current Cocoon 
philosophy but it could get the job done by allowing you to move some
work off to the user's machine. Try:

java -server -cp $whatever org.apache.fop.apps.Fop and parameters

5) Special measures are only warranted where there are BIG reasons
for taking them. Having users wait half an hour to generate a PDF
probably counts as one.

6) Check into different versions of software. I think there were
more performance issues in earlier versions of Cocoon and FOP.

 I build an front-end with woody in which the user can
 choose the document parts. All this is stored in the container.
 There are some saxon calls for building the fo file(pdf),
 the xml file(html) or the rfk file (for a special rtf converter).
 
 Here is the ugly part I rather want to change:
 
 a cgi script is started which calls the rtf converter and a pdf converter(not fop)to 
 process
 the document creation. these are no java apps.
 Is there a possibility to do this somehow different?
 I want to integrate this somehow into cocoon, but don't know how.
 At the moment the user has to leave the browser window open until the end of the 
 creation
 because of the cgi process.

I played around with other means of generating docbook documents on
Linux. There are some native commands like docbook2pdf on RedHat 9.
They might be in C/C++ and therefore faster. Your mileage may vary.

In general, I find Cocoon to be excellent although there are issues
around FOP that will be solved in the future.


 thanks for all ideas
 
 regards dominik
 
 __

-- 
John Austin [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]



Re: Using Cron to call pipelines in background

2003-12-10 Thread Christian Haul
Dean Cording wrote:
Has anyone used the Cron block to invoke a pipeline in the background?
If you use the scheduler, you may not access cocoon: URLs because they
are only available from within a request. A workaround is to use http:
URLs and thus create an external request. To avoid others from calling
those URLs you could restrict them to access from localhost by matching
the client's IP address for example.
	Chris.

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


RE: Authentication and Autorization

2003-12-10 Thread Gianluca Sartori
Il mar, 2003-12-09 alle 16:51, Ralph Goers ha scritto:
 You should investigate the authentication framework block before you go too
 far down the road.  It provides much of the functionality you are looking
 for. 

Our authentication/authorization system implements a single-sign-on on
multiple sites/domains, much like the Microsoft Passport. I'm going to
have a look at the cocoon authentication framework, but I need a way to
extend it integrating my client library. There are some SOAP calls,
but this shouldn't be a problem.

 We have just completed integrating Cocoon's authorization framework
 with JAAS and had to write to components to do it.

We are using JAAS too on the authentication server side. What I need
to integrate with cocoon is the client side of the system. Actually I
don't want to let the site runing cocoon do the authentication itself,
but only communicate with an authentication server (which, anyway, is
not so different architecturally speaking). I don't think coccon can do
this (the protool is unknow to coccon), but if there's a way to extend
the framework I'll be glad if you could point me to some documentation.

 The first component is
 authentication generator to perform the authentication and return the
 required XML to the framework, along with the data to be associated with the
 user. The generator creates an object which actually performs the
 authentication. This object is saved in the session for later use. 

So I use a generator to get User info. Then with the PermissionSelector
I can decide what to do. Uhmm, This means I must redirect to different
pages depending on permission owned by the user? (stupid question, I
know, but I'm still studying cocoon, it's a big beast...). Sometimes it
is useful to move the logic from the sitemap into the page and take
decision in there instead of having multiple pages for each user type.
Or at least, this is what I've done till now. Probably is not so
different, anyway.

 The second component is a PermissionSelector which is very similar to the
 ExceptionSelector. When configuring the selector you define the permissions
 that can be checked and then the selector actually checks to see if the end
 user has the requested permission. The selector uses the object saved in the
 session by the generator to do the permission check.

I'll check. Could you point me to some documentation if it exists?


Thanks for all,
Gianluca
 
 
 Ralph
 
  -Original Message-
  From: Gianluca Sartori [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 09, 2003 7:08 AM
  To: [EMAIL PROTECTED]
  Subject: Authentication and Autorization
  
  
  Hi all,
  
  I'm adapting an authentication/authorization system we 
  are using within
  normal JSP/servet pages. It consists of a simple class which must be
  instantiated at the beginning of the page. It knows where to redirect
  the user for authentication and within the JSP/Servlet you can use its
  methods to get user information such as the username, fullname,
  telephone, etc.
  
  What's the best place to incapsulate the funcionalities 
  provided by this
  class? I'm buiding an action for authentication purposes and I plan to
  develop a logicsheet to incapsulate authorization primitives so I can
  declaratively decide whether to make available some data or not
  depending on the current user role.
  
  Is this the way to go? I thought about incapsulate my class into an
  action, but this way I don't know how to take authorization decisions.
  For example I need one edit link if the user has the Editors role,
  but none if s/he has the User role. I don't want to create two
  different pages for this.
  
  Any help?
  
  Thanks,
  Gianluca
  
  -- 
  Gianluca Sartori ELIS - SIE - Software Development
  
  Via Sandro Sandri, 81 (tel) +39 06.43.56.03.55
  00159 Rome - Italy(fax) +39 06.43.56.03.99
  
  
  
  -
  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]
-- 
Gianluca Sartori ELIS - SIE - Software Development

Via Sandro Sandri, 81 (tel) +39 06.43.56.03.55
00159 Rome - Italy(fax) +39 06.43.56.03.99



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



Re: [Woody binding] Binding of wd:booleanfield - is it supported?

2003-12-10 Thread Marcin Okraszewski
Sorry, it was my fault! I must have been very tired yesterday. It works 
even without wb:convertor.

Thanks a lot!
Marcin Okraszewski
--- Marcin Okraszewski [EMAIL PROTECTED] wrote:

Hi,
It seems that binding of _wd:booleanfield_ isn't supported.
Am I right or am I doing something wrong?


Try this and please report back:

wb:value id=your_widget_name path=your_path_to_value
  wd:convertor datatype=boolean/
/wb:value
Note that convertor is spelled with or, the less common
spelling, and that convertor is in the wd (woody definition)
namespace, not the wb (woody binding) namespace that the
rest of the binding file uses.  Of course this also will mean
that you need to ad the wd namespace declaration somewhere,
such as to the top of the binding file.
HTH,
--Tim Larson
__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
-
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]


Looking for Cocoon professional developers in Sweden...

2003-12-10 Thread Mikael Björn
Hi!
I'm trying to convince my employer of a new plattform for
a new big web application. So I'm looking for professional 
developers using Cocoon in Sweden with in-depth knowledge 
in Java, databases and JBoss...

Is there any of you out there?

What have you done so far with Cocoon?

Thanks for your time and effort...

/Micke


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



[Flowscript] Obtaining servlet context directory

2003-12-10 Thread Andreas Hartmann
Hi Cocoon users,

I'm looking for an easy way to obtain the directory
of the servlet context in a flowscript. Is there any
reason why context.getRealPath() in FOM_Cocoon is not
(yet?) implemented?
By now I'm doing

var sourceResolver = cocoon.getComponent(
Packages.org.apache.excalibur.source.SourceResolver.ROLE);
var source = sourceResolver.resolveURI(context:///);
var sourceFile =
Packages.org.apache.excalibur.source.SourceUtil.getFile(source);
var contextPath = sourceFile.getAbsolutePath();
sourceResolver.release(source);
cocoon.releaseComponent(sourceResolver);
Is there something shorter and more elegant?

Thanks in advance,
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Using Cron to call pipelines in background

2003-12-10 Thread Reinhard Poetz

From: Christian Haul

 Dean Cording wrote:
  Has anyone used the Cron block to invoke a pipeline in the 
 background?
 
 If you use the scheduler, you may not access cocoon: URLs 
 because they are only available from within a request. A 
 workaround is to use http: URLs and thus create an external 
 request. To avoid others from calling those URLs you could 
 restrict them to access from localhost by matching the 
 client's IP address for example.

I'm working on this - pls follow 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25384

--
Reinhard


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



Re: How to nest logicsheet tags of different libraries

2003-12-10 Thread Stephanie Zohner
Thanks a lot, that was the solution, however now I have another problem.

xsp-session-fw:getxml as=string context=authentication
path=/authentication/data/name/

returns not the whole string, I put in the authentication context, but only
the first 7 chars, or so .
For example, when I put Stephanie Zohner in the context, only Stephan is
returned.

I looked into the generated Java Code. This is the code fragment, that is
generated out of the xsp-session-fw:getxml Tag.

XSPSessionFwHelper.getXML(this.manager,
String.valueOf(authentication),
   
String.valueOf(/authentication/data/name))).getFirstChild().getNodeValue())
  );

It takes only the first child node of the returned XML Fragment. However
Stephanie Zohner is shared among 3 child nodes.Taking only the first node
results in extracting only the first of three parts of my name. 

This happens when I use the as= 'string'. If I use as= 'object' I would
get the entire string, but then again I get an eeption (as you have
predicted), because a String is expected by the my method and not an DocumentFragment.

Is it a bug, that only the first node is taken when using the attribute ''as
= 'string''?

Are there any work arounds?


Thanks in advance,

Stephanie

 
 
 
 
 try xsl:copy-of select=node()/ instead.  That should copy the
 xsp-session-fw:getxml ... into the output, where it will later get tu
 rned
 into some kind of java expression (hopefully!) by the xsp-session-fw
 logicsheet.  However, I think you want to change your getxml tag as
 attribute to as=string, or else it looks like you will get an
 org.w3c.dom.DocumentFragment instead of String, and get an exception
 anyway!
 
 -Christopher
 
 
 
 Hi,
 
 I have big problems with my custom logicsheet, hopeyou can help:
 
 I would like to read the user name from the authentication context and 
 use
 it as a parameter for a method call of my Helper Class.
 
 However, at the time the template wants to replace xsl:value-of
 select=./with the value from the authentication context, there is 
 no
 (text) value.
 
 So that in the end, the XSP is transformed to:
 
 BlockerHelper.getInstance().setEditorName();
 
 This throughs an exception, because a String value is expected as metho
 d
 parameter.
 
 
 Every hint is appreciated,
 
 Thanks Stephanie
 
 
 
 My xsp:page looks like this:
 ---
 -
 
 xsp:page xmlns:xsp=http://apache.org/xsp;
 xmlns:blocker=http://test.de/blocker; xmlns:xsp-session-fw=
 http://apache.org/xsp/session-fw/1.0;
  page
  xsp:logic
  !--some java logic --
  blocker:set
 xsp-session-fw:getxml as=object context=authentication
 path=/authentication/data/name//blocker:set
  /xsp:logic
  /page
 /xsp:page
 ---
 -
 
 
 The XSL-Template in my logicsheet looks like this:
 
 ---
 -
 
 !-- other templates --
 xsl:template match=blocker:set
 
 xsp:logicBlockerHelper.getInstance().setEditorName(xsl:value-of
 select=./);
  /xsp:logic
 /xsl:template
 !-- other templates --
 ---
 -
 
 
 --
 +++ GMX - die erste Adresse für Mail, Message, More +++
 Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net
 
 
 
 -
 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]
 

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



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



SourceWritingTransformer problem giving INVALID_CHARACTER_ERR

2003-12-10 Thread Hugh Field-Richards
Hi

I am using Cocoon 2.1.3 and am having trouble with, I think,
the SourceWritingTransformer. My sitemap fragment is

  map:match pattern=updateDoc.html>
map:generate type=jxt src=updateDoc-en.xml />
map:act type=auth-protect>
map:parameter name=handler value=adminHandler/>
map:parameter name=application value=adminApp/>

map:transform type=session />
map:transform type=write-source/>
map:serialize type=xml/>
/map:act>
/map:match>

The XML file fragment in updateDoc-en.xml I am trying process is

	source:insert>

/source:source>

source:path>/*[namespace-uri()=http://www.niscc.gov.uk/Schema/Advisory and local-name()=version]/source:path>
source:fragment>
version:entry date=${docDateString} >
version:issuer ref=${adminUser}/>

/version:desc>
/version:entry>
/source:fragment>
/source:insert>

This was based on the doc that comes with the SourceWritingTransformer.
The error report that is produced is:

Message: Failed to execute pipeline.

Description: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: org.apache.cocoon.ProcessingException: Unable to create new DOM node: '*'.: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Request URI

admin/editDoc-en.html

cause

org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. 

request-uri

/niscc/admin/editDoc-en.html

full exception chain stacktrace

Original Exception: org.apache.cocoon.ProcessingException: Unable to create new DOM node: '*'.: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. 
at org.apache.cocoon.transformation.AbstractSAXTransformer.endElement(AbstractSAXTransformer.java:360)
at org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:147)
at org.apache.cocoon.transformation.AbstractSAXTransformer.endElement(AbstractSAXTransformer.java:366)
at org.apache.cocoon.webapps.session.transformation.SessionPreTransformer.endElement(SessionPreTransformer.java:127)
at org.apache.cocoon.generation.JXTemplateGenerator.execute(JXTemplateGenerator.java:3021)
at org.apache.cocoon.generation.JXTemplateGenerator.generate(JXTemplateGenerator.java:2790)
at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:557)
at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:501)
at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:176)
...

Original Exception: org.apache.cocoon.ProcessingException: Unable to create new DOM node: '*'.: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. 
at org.apache.cocoon.xml.dom.DOMUtil.selectSingleNode(DOMUtil.java:757)
at org.apache.cocoon.transformation.SourceWritingTransformer.insertFragment(SourceWritingTransformer.java:651)
at org.apache.cocoon.transformation.SourceWritingTransformer.endTransformingElement(SourceWritingTransformer.java:472)
at org.apache.cocoon.transformation.AbstractSAXTransformer.endElement(AbstractSAXTransformer.java:358)
at org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:147)
at org.apache.cocoon.transformation.AbstractSAXTransformer.endElement(AbstractSAXTransformer.java:366)
at org.apache.cocoon.webapps.session.transformation.SessionPreTransformer.endElement(SessionPreTransformer.java:127)
at org.apache.cocoon.generation.JXTemplateGenerator.execute(JXTemplateGenerator.java:3021)
at org.apache.cocoon.generation.JXTemplateGenerator.generate(JXTemplateGenerator.java:2790)
at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:557)
at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:501)
at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)

TIA for any help

Hugh F-R


Dr Hugh S. Field-Richards
Principle Scientist
QinetiQ, St Andrew's Road, Malvern, Worcs, WR14 3PS, UK
Tel: ++1684 895075   Fax: ++1684 896113
Email: [EMAIL PROTECTED]

The views expressed above area are entirely those of the writer and
do not represent the views, policy or understanding of any other
person or official body.



ojb in flow

2003-12-10 Thread Michael Wolf
Hello,

I'm trying to use ojb from the flow.
To start I only want to use the ojb PersistenceBroker like it is shown 
in the GT2003 slides from Christian Haul.

I have installed the ojb block, but without jdo (i didn't include 
jdo.jar and jori.jar)

So far I wasn't able to do it.
What classes do I have to import to make it run?
Is there a special place to put them.
Thanks,

Michael

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


installing cocoon2.1.4 on tomcat-5.0.16

2003-12-10 Thread Boris Althaus



Hallo,
does somebody can help me to install the 
current-source release of cocoon(2.1.14) on tomcat 5.

I build cocoon with ant and ant war. Then i put the 
cocoon.war into webapps-directory. After restarting tomcat it shows only a 
directory listing of the cocoon-directory.

Boris



Re: installing cocoon2.1.4 on tomcat-5.0.16

2003-12-10 Thread Boris Althaus



Sorry, its cocoon-2.1.3.

  - Original Message - 
  From: 
  Boris Althaus 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, December 10, 2003 12:46 
  PM
  Subject: installing cocoon2.1.4 on 
  tomcat-5.0.16
  
  Hallo,
  does somebody can help me to install the 
  current-source release of cocoon(2.1.14) on tomcat 5.
  
  I build cocoon with ant and ant war. Then i put 
  the cocoon.war into webapps-directory. After restarting tomcat it shows 
  only a directory listing of the cocoon-directory.
  
  Boris
  


Re: ojb in flow

2003-12-10 Thread Antonio Gallardo
Michael Wolf dijo:
 Hello,

 I'm trying to use ojb from the flow.
 To start I only want to use the ojb PersistenceBroker like it is shown
 in the GT2003 slides from Christian Haul.

 I have installed the ojb block, but without jdo (i didn't include
 jdo.jar and jori.jar)

PLease update from the CVS. I just committed a new OJB lib to allow the
use of JDO 1.01

Just copy jdo.jar and jdori.jar in WEB-INF/lib

 So far I wasn't able to do it.
 What classes do I have to import to make it run?

Check if you have uncommented the OJB block in your local.blocks.properties.

 Is there a special place to put them.

If you want to include them in the war, then copy the jdo.jar and
jdori.jar in /$COCOON/lib/local

then rebuild, the libs will be included in you war file.

Best Regards,

Antonio Gallardo

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



RE: installing cocoon2.1.4 on tomcat-5.0.16

2003-12-10 Thread Kieran Kirwan
One thing you need to be sure of is that there are no existing ..\webapps\cocoon 
directory (just rename old directory if so).
Also sometimes it takes a few shutdowns/restarts to register.


_
Kieran Kirwan
Executive Transportation Planner
Transportation Modelling Department

Dublin Transportation Office
Hainault House,
69/71 St. Stephen's Green,
Dublin 2,
Ireland.
Tel: +353 (0)1 4778113
Fax: +353 (0) 1 478 5935
website: www.dto.ie 

-Original Message-
From: Boris Althaus [mailto:[EMAIL PROTECTED]
Sent: 10 December 2003 12:04
To: [EMAIL PROTECTED]
Subject: Re: installing cocoon2.1.4 on tomcat-5.0.16


Sorry, its cocoon-2.1.3.
- Original Message - 
From: Boris Althaus 
To: [EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 12:46 PM
Subject: installing cocoon2.1.4 on tomcat-5.0.16


Hallo,
does somebody can help me to install the current-source release of cocoon(2.1.14) on 
tomcat 5.

I build cocoon with ant and ant war. Then i put the cocoon.war  into 
webapps-directory. After restarting tomcat it shows only a directory listing of the 
cocoon-directory.

Boris
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
Mail Marshal for the presence of computer viruses.

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



woody: bind a booleanfield to many container elements

2003-12-10 Thread Ulrich, Dominik
Hi everybody!

Can I bind a woody booleanfield to many nodes in the container?
for example:

...
wd:booleanfield id=1234
wd:labelsomething/wd:label
/wd:booleanfield
..

this should be bound to the include attributes:
..
element1 include=/
element2 include=/
element3 include=/
...

How would my binding look like?

Any help highly appreciated

thanks dominik

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



Getting Cocoon 2.1 to start?

2003-12-10 Thread Derek Hohls
Development environment:  WindowsXP; JDK1.3

Up to now, I have been using Cocoon 2.0.4 and Tomcat 4.0.4, 
a combination which worked well for me.

I now want to start using Cocoon 2.1 - it did not work under 
Tomcat 4.0.4 and it was suggested that I use version 4.1.

I downloaded and ran the Windows .exe version; remembering to
check the 'install as service' option.  However, when I try
and start the service, Tomcat 4.1 does not startup and run as
normal (i.e. as it did with version 4.0.4). (I tried the install
procedure twice now, as well as rebooting)

When I look in the error.log file, the only message is one that
starts:

Created catalinaLoader in: d:\tomcat\server\lib
[ERROR] Digester - -Begin event threw exception 
java.util.MissingResourceException: Can't find bundle  for 
base name org.apache.coyote.tomcat4.LocalStrings, locale en_ZA
java.util.MissingResourceException: Can't find bundle for 
base name org.apache.coyote.tomcat4.LocalStrings, locale en_ZA
...

Could this be why Tomcat does not start?  If so, how to fix it??

If anyone has any experience with the above combinations -
Windows XP + JDK1.3. and Tomcat 4.1 or Tomcat 5, I'd appreciate 
hearing from you.

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]



Re: [Flowscript] Obtaining servlet context directory

2003-12-10 Thread Peter Velychko
Hi,

Excuse me I don't know about better way.
But my question is about context directory in case of application
works from WAR-archive.

In that case if I have
var sourceFile = Packages.org.apache.excalibur.source.SourceUtil.getFile(source);
the sourceFile is null.

Could anyone advice right way?

Thanks a lot in advance.

Andreas wrote:

AH Hi Cocoon users,

AH I'm looking for an easy way to obtain the directory
AH of the servlet context in a flowscript. Is there any
AH reason why context.getRealPath() in FOM_Cocoon is not
AH (yet?) implemented?

AH By now I'm doing


AH var sourceResolver = cocoon.getComponent(
AH  Packages.org.apache.excalibur.source.SourceResolver.ROLE);

AH var source = sourceResolver.resolveURI(context:///);
AH var sourceFile =
AH  Packages.org.apache.excalibur.source.SourceUtil.getFile(source);
AH var contextPath = sourceFile.getAbsolutePath();

AH sourceResolver.release(source);
AH cocoon.releaseComponent(sourceResolver);


AH Is there something shorter and more elegant?

AH Thanks in advance,
AH -- Andreas


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


Best regards,
Peter Velychko
[EMAIL PROTECTED]


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



Re: session:getxml not allowed in this position in the stylesheet

2003-12-10 Thread Bruce Perryman
Hi Julien,

Thanks for your response. 

I have the session namespace declared in my
stylesheet,  and a simple request will work. For
example:

name
 session:getxml context=usrstuff path=/fname/
/name

works fine. But if I want to have the background color
of an html page to be retrieved from the session and
placed in a body tag, I can't get it to work.

html
 body bgcolor=X (where 'X' would come from
session)
 /body
/html

I've tried xsl:variables, xsl:attributes with no
success. 

Thanks again.
--- julien bloit [EMAIL PROTECTED] wrote:
 Hi Bruce,
 
 You can use this tag in a xsl:template tag, as
 long as the session
 namespace is dclared in your xsl document.
 
 Can you provide a sample of the xsl you have a
 problem with?
 
 
 - Original Message - 
 From: Bruce Perryman [EMAIL PROTECTED]
 To: cocoon [EMAIL PROTECTED]
 Sent: Tuesday, December 09, 2003 2:46 PM
 Subject: session:getxml not allowed in this
 position in the stylesheet
 
 
  Hello,
 
  I want to use session:getxml to retrieve data
 which
  has been stored in the session with
 session:setxml
  and place it in an html page.
  Where are allowable positions for session:getxml
 in
  an xsl stylesheet?
 
  Thanks.
 
  __
  Do you Yahoo!?
  New Yahoo! Photos - easier uploading and sharing.
  http://photos.yahoo.com/
 
 

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


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



Re: ojb in flow

2003-12-10 Thread Michael Wolf
My question was more about the flow.

To use the PersistenceBroker I tried:

importClass(Packages.org.apache.ojb.broker.PersistenceBroker);
importClass(Packages.org.apache.ojb.broker.PersistenceBrokerFactory);
importClass(Packages.org.apache.ojb.broker.util.ui.AsciiSplash);
function ojbTest(){
broker = PersistenceBrokerFactory.defaultPersistenceBroker();
}
when calling the function I get the following error message:
java.lang.NoClassDefFoundError
Michael



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


Re: Access session user data from flow

2003-12-10 Thread Jeremy Quinn
On 9 Dec 2003, at 03:13, Antonio Gallardo wrote:

Jeremy Quinn dijo:
On 8 Dec 2003, at 14:31, Antonio Gallardo wrote:

Upayavira dijo:
Is it more useful to return a UserHandler than a boolean? The 
auth.js
code is experimental, and can thus be changed. If you can supply a
usecase as to why it should be changed, personally, I'd say go ahead
and
commit a change. It is good to have real users using the code, as
what I
came up with was just a first iteration.
My use-case was that I wanted to read values from the authentication
XML in my 'login' script, because we needed to see certain values (eg.
the user's full name) outside of the security zone. I read the values 
I
need and set them as Session Attributes.
I did the same :-D But I think you did it more general. I just added 
some
functions to allow this:
Handy

/* Returns the userID in the session */
function auth_getUserID() {
  var handler = authhandler;
  var authMgr = null;
  try {
authMgr = 
cocoon.getComponent(Packages.o.a.c...AuthenticationROLE);
// autentication
if (authMgr.checkAuthentication(null, handler, null)) {
  // User already autenticated, get the UserID
  var userId = authMgr.getState().getHandler().getUserId();
  return parseInt(userId);
}
  } finally {
cocoon.releaseComponent(authMgr);
  }
  return null;
}

A much better way of handling that IMHO would be to use a FlowScript
based authentication pipeline, and set up the Session there. This
unfortunately is still alluding us, we still get bizarre errors (null
FOM_Request etc.) when attempting this, after much research . we
now only get it the 2nd time someone logs in  =:'(  (deeply weird).
In our case, we have the code already stable. No problems.
I'd love to see how 


Another thing I have done to the flow-auth-fw is to Woodify it .
maybe you'd be more interested in that?
We have woodified code too. :-D
Ha!

Hmm... I think this kind of changes will break the authentication for
people that already use it (I am one of them). I prefer to first talk
about this change and if it is OK. Make the change.
Is this OK?
No offence Antonio , but is it a Sample or an API ? :)
Part of them is sample, but there is an auth.js inside the
authentication-fw block that is not a sample to me. I mean:
org/apache/cocoon/webapps/authentication/flow/javascript/auth.js

But I am perfectly happy to discuss any changes that might be made 

I agree. Lets discuss about it. I think it is a good idea. I don't have
problem to show the code we did. Is this OK? Then I am sure we can got 
a
better support for woody and flow in the auth-fw.
OK, so how to move forward?

Some possible options for the modifications to make:

1) Woodification
2) Flow-base authorisation pipeline
3) i18n
4) utility functions to read authorisation data
5) reject User after a certain number of failed logins
etc.
Some possible options for where to work:

1) Start a new flowscript auth-fw in the scratchpad, intended as a 
replacement for the one in blocks
2) Work on the flowscript auth-fw directly in it's block
3) Put together a new flowscript auth-fw in a Wiki page, to replace the 
block when ready.
etc.

WDYT?

regards Jeremy




smime.p7s
Description: S/MIME cryptographic signature


Re: Access session user data from flow

2003-12-10 Thread Upayavira
Jeremy Quinn wrote:

Some possible options for where to work:

1) Start a new flowscript auth-fw in the scratchpad, intended as a 
replacement for the one in blocks
2) Work on the flowscript auth-fw directly in it's block
3) Put together a new flowscript auth-fw in a Wiki page, to replace 
the block when ready.
etc.
2).

It is not stable, nor documented. So go ahead and make it good. Fix  
work on what's there.

Upayavira

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


xslt and multiple values as parameter

2003-12-10 Thread Robert Frank
Hi,

I'm using apache, tomcat, and cocoon 2.1. I've set up an xslt (standard 
transformer) to generate a form which contains a list of checkboxes. I 
want to pass the checked values back to the same process.
I have enabled passing parameters and can retrieve the value of the 
first checked box, but I am not able to set up the whole thing to 
retrieve all checked values.
My search on google revieled that I have to pass a node set (which 
would be exactly what I need). But I could not find any document 
describing how to accomplish this. How do I go about this? Do I have to 
use something other than the default transformer? I actually don't want 
to have to use anything with XForms (or alikes), as the page presented 
isn't really a form (user's view), but rather a display of information 
which can selectively be modified.

Thanks in advance.

Robert

Departement Informatik tel  +41 (0)61 267 14 66
Universitaet Basel fax. +41 (0)61 267 14 61
Robert Frank
Klingelbergstrasse 50  [EMAIL PROTECTED]
CH-4056 Basel
Switzerland
http://www.informatik.unibas.ch/personen/frank_r.html
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Access session user data from flow

2003-12-10 Thread Jeremy Quinn
On 10 Dec 2003, at 13:33, Upayavira wrote:

Jeremy Quinn wrote:

Some possible options for where to work:

1) Start a new flowscript auth-fw in the scratchpad, intended as a 
replacement for the one in blocks
2) Work on the flowscript auth-fw directly in it's block
3) Put together a new flowscript auth-fw in a Wiki page, to replace 
the block when ready.
etc.
2).

It is not stable, nor documented. So go ahead and make it good. Fix  
work on what's there.
Upayavira
fine by me . so maybe we had better move this thread over to the 
dev list . ??

regards Jeremy


smime.p7s
Description: S/MIME cryptographic signature


Re: Access session user data from flow

2003-12-10 Thread Upayavira
Jeremy Quinn wrote:

On 10 Dec 2003, at 13:33, Upayavira wrote:

Jeremy Quinn wrote:

Some possible options for where to work:

1) Start a new flowscript auth-fw in the scratchpad, intended as a 
replacement for the one in blocks
2) Work on the flowscript auth-fw directly in it's block
3) Put together a new flowscript auth-fw in a Wiki page, to replace 
the block when ready.
etc.


2).

It is not stable, nor documented. So go ahead and make it good. Fix  
work on what's there.
Upayavira


fine by me . so maybe we had better move this thread over to the 
dev list . ??
Yup.



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


Re: session:getxml not allowed in this position in the stylesheet

2003-12-10 Thread Stephanie Zohner
Have you tried this:

xsl:template ...
xsl:variable name=bgcolor
xsl:value-of select=name/xsl:value-of
/xsl:variable
html
head
title/title
/head
body bgcolor={$bgcolor}/body
/html

/xsl:template

Regards,

Stephanie


 Hi Julien,
 
 Thanks for your response. 
 
 I have the session namespace declared in my
 stylesheet,  and a simple request will work. For
 example:
 
 name
  session:getxml context=usrstuff path=/fname/
 /name
 
 works fine. But if I want to have the background color
 of an html page to be retrieved from the session and
 placed in a body tag, I can't get it to work.
 
 html
  body bgcolor=X (where 'X' would come from
 session)
  /body
 /html
 
 I've tried xsl:variables, xsl:attributes with no
 success. 
 
 Thanks again.
 --- julien bloit [EMAIL PROTECTED] wrote:
  Hi Bruce,
  
  You can use this tag in a xsl:template tag, as
  long as the session
  namespace is dclared in your xsl document.
  
  Can you provide a sample of the xsl you have a
  problem with?
  
  
  - Original Message - 
  From: Bruce Perryman [EMAIL PROTECTED]
  To: cocoon [EMAIL PROTECTED]
  Sent: Tuesday, December 09, 2003 2:46 PM
  Subject: session:getxml not allowed in this
  position in the stylesheet
  
  
   Hello,
  
   I want to use session:getxml to retrieve data
  which
   has been stored in the session with
  session:setxml
   and place it in an html page.
   Where are allowable positions for session:getxml
  in
   an xsl stylesheet?
  
   Thanks.
  
   __
   Do you Yahoo!?
   New Yahoo! Photos - easier uploading and sharing.
   http://photos.yahoo.com/
  
  
 
 -
   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]
  
 
 
 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing.
 http://photos.yahoo.com/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



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



Pipeline 'expires' parameter

2003-12-10 Thread Jeremy Quinn
Hi All

I am attempting to use the Pipeline's 'expires' parameter to trigger 
Browser Caching.

This has worked before, but for some reason makes no difference now 

map:pipeline
  map:parameter name=expires value=access plus 1 days/
  map:match pattern=
map:redirect-to uri=cocoon:/index(0).html/
  /map:match
  map:match pattern=index(*).html
map:call function=index
  map:parameter name=screen value=screen/index/
  map:parameter name=page value={1}/
  map:parameter name=size value=20/
/map:call
  /map:match
  . . .

/map:pipeline

Any Suggestions?

regards Jeremy 

smime.p7s
Description: S/MIME cryptographic signature


RE: session:getxml not allowed in this position in the styleshe et

2003-12-10 Thread Fleischer Roman
The right way to show this is:

xsl:template ...
html
head
title/title
/head
body
xsl:attribute name=bgcolorsession:getxml
context=usrstuff path=/fname//xsl:attribute
/body
/html

After this xslt-transformer you have to add a session-transformer to the
sitemap-matcher like this:
map:transform type=xslt src=your_sheet.xsl/
map:transform type=session/

This works for me
Regards
Roman

-Original Message-
From: Stephanie Zohner [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 10. Dezember 2003 14:49
To: [EMAIL PROTECTED]
Subject: Re: session:getxml not allowed in this position in the
stylesheet


Have you tried this:

xsl:template ...
xsl:variable name=bgcolor
xsl:value-of select=name/xsl:value-of
/xsl:variable
html
head
title/title
/head
body bgcolor={$bgcolor}/body
/html

/xsl:template

Regards,

Stephanie


 Hi Julien,
 
 Thanks for your response. 
 
 I have the session namespace declared in my
 stylesheet,  and a simple request will work. For
 example:
 
 name
  session:getxml context=usrstuff path=/fname/
 /name
 
 works fine. But if I want to have the background color
 of an html page to be retrieved from the session and
 placed in a body tag, I can't get it to work.
 
 html
  body bgcolor=X (where 'X' would come from
 session)
  /body
 /html
 
 I've tried xsl:variables, xsl:attributes with no
 success. 
 
 Thanks again.
 --- julien bloit [EMAIL PROTECTED] wrote:
  Hi Bruce,
  
  You can use this tag in a xsl:template tag, as
  long as the session
  namespace is dclared in your xsl document.
  
  Can you provide a sample of the xsl you have a
  problem with?
  
  
  - Original Message - 
  From: Bruce Perryman [EMAIL PROTECTED]
  To: cocoon [EMAIL PROTECTED]
  Sent: Tuesday, December 09, 2003 2:46 PM
  Subject: session:getxml not allowed in this
  position in the stylesheet
  
  
   Hello,
  
   I want to use session:getxml to retrieve data
  which
   has been stored in the session with
  session:setxml
   and place it in an html page.
   Where are allowable positions for session:getxml
  in
   an xsl stylesheet?
  
   Thanks.
  
   __
   Do you Yahoo!?
   New Yahoo! Photos - easier uploading and sharing.
   http://photos.yahoo.com/
  
  
 
 -
   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]
  
 
 
 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing.
 http://photos.yahoo.com/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



-
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: session:getxml not allowed in this position in the stylesheet

2003-12-10 Thread julien bloit

- Original Message - 
From: Bruce Perryman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 1:52 PM
Subject: Re: session:getxml not allowed in this position in the stylesheet


 Hi Julien,

 Thanks for your response.

 I have the session namespace declared in my
 stylesheet,  and a simple request will work. For
 example:

 name
  session:getxml context=usrstuff path=/fname/
 /name


Does this return
namenameReturned/name
?

 works fine. But if I want to have the background color
 of an html page to be retrieved from the session and
 placed in a body tag, I can't get it to work.

 html
  body bgcolor=X (where 'X' would come from
 session)
  /body
 /html

 I've tried xsl:variables, xsl:attributes with no
 success.


If the previous snippet works, it might just be an xsl issue. Have you tried
somthing like :

xsl:element name=bodyxsl:attribute name=bgcolorsession:getxml
context=usrstuff path=/fname//xsl:attribute/xsl:element


HTH,

Regards,
Julien

 Thanks again.
 --- julien bloit [EMAIL PROTECTED] wrote:
  Hi Bruce,
 
  You can use this tag in a xsl:template tag, as
  long as the session
  namespace is dclared in your xsl document.
 
  Can you provide a sample of the xsl you have a
  problem with?
 
 
  - Original Message - 
  From: Bruce Perryman [EMAIL PROTECTED]
  To: cocoon [EMAIL PROTECTED]
  Sent: Tuesday, December 09, 2003 2:46 PM
  Subject: session:getxml not allowed in this
  position in the stylesheet
 
 
   Hello,
  
   I want to use session:getxml to retrieve data
  which
   has been stored in the session with
  session:setxml
   and place it in an html page.
   Where are allowable positions for session:getxml
  in
   an xsl stylesheet?
  
   Thanks.
  
   __
   Do you Yahoo!?
   New Yahoo! Photos - easier uploading and sharing.
   http://photos.yahoo.com/
  
  
 
 -
   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]
 


 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing.
 http://photos.yahoo.com/

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



[PROBLEM] Encoding UTF-8 or ISO-8859-1

2003-12-10 Thread Lionel Crine
Hi,

I' have some real problems to with my encoding.

My application get some parameters from the form and create a document with 
an xsp.
After that, I'm using DOM and SAX transformers, generators, etc ... to 
manipulate the XML document.

I'm trying to figure out, what should I configure to get the special 
characters (§, °, etc ...) to work.

For example,

With the ° character, I tried several ways to encode but none works.

If I have ° encoding in UTF-8. IE display it like that.
If I have ° encoding in ISO-8859-1, IE understand but the the transformers 
or generators don't understand and modify it in ? (custom SAX Transformer 
do that) or ° (custom DOM transformer do that).
In my SAX transformer, I did not specify some special encodingor 
characters mappings).
In my DOM transformer, I have to get the Stream and put it in a 
DOM the serialize it, usually I write :

 docString = org.apache.cocoon.xml.XMLUtils.serializeNode(doc, 
this.formatModification);
 byte[] bytesDoc = docString.trim().getBytes(UTF-8);



I want my cocoon to use only UTF-8 encoding. Is there a stable way to do this ?

I read some articles on wiki and try to find a solution but it doesn't work.

Articles I have read.
- RequestParameterEncoding
- outputencoding
Any help would be really appreciate.

Lionel





Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: flow: how to upload images into a database

2003-12-10 Thread Joern Wallstabe
On Tue, 09 Dec 2003 14:56:20 +0100
Christian Haul [EMAIL PROTECTED] wrote:

 Joern Wallstabe wrote:
 
  or can I use 
  convert, setColumn etc.  from  org.apache.cocoon.util.JDBCTypeConversions ??
 
 Guess so. But the input object must be of a supported type (the sample 
 uses the raw-request-param module for this).
 
   Chris.
 
Hello Chris,
thanks for the quick reply.
To get the image into the database i'm using the following

importPackage(Packages.org.apache.cocoon.util);
if (my_image != null) { 
var ps=conn.prepareStatement(UPDATE my_table SET image=? WHERE 
image_id=?);
ps.setString(2,imageID); 
ps.setBinaryStream(1,my_image,my_image_size);
ps.executeUpdate();
ps.close(); 
}



To get the image out:

importPackage(Packages.org.apache.cocoon.util);
var ps=conn.prepareStatement(SELECT image  FROM my_table WHERE image_id=?);
ps.setString(1,imageID);
var rs= ps.executeQuery();
  
if (rs!= null){
if(rs.next()){
var result = rs.getBinaryStream(1); 
}
rs.close();
}
ps.close(); 
 

How to I have to process the resulting bytearray (var result = rs.getBinaryStream(1);) 
to get an  image back ?

Regards jörn



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



Re: how to create XML DOM from SAX event

2003-12-10 Thread Lionel Crine
Here is one of my examples :

public class TransformerAddDmidref extends AbstractDOMTransformer {
private String dmfamilyref;
/**
 * Set the codeSourceResolver/code, objectModel codeMap/code,
 * the source and sitemap codeParameters/code used to process the request.
 *
 * If you wish to process the parameters, override this method, call
 * codesuper()/code and then add your code.
 */
public void setup(SourceResolver resolver, Map objectModel, String src, 
Parameters par) throws ProcessingException, SAXException, IOException {
super.setup(resolver, objectModel, src, par);
}

/**
 * Get the DOM return it in the flow.
 */
protected Document transform(Document doc) {
doc = this.builder.getDocument(); //get the doc as DOM
doc = this.addDmidref(doc); //any method you want to use.
return doc;
}


Lionel

At 13:44 03/12/2003 -0500, you wrote:

i have tried to extend the AbstractDOMTransformer class. and now i dont find
anyhelp for ,how to work with transform method? it takes Document argument
and returns the document.but which other methods do I need to implement. I m
new bie and have started writing transformer straight away so, please help
me.
here is my code.i want to now get the Document object of the sax event that
has come from generator into my transformer.where do I write my code ? do i
have toimplement startElement and endElement methods? or just carry on with
transformer method? and another question is,
what does this transformer passes to next componanat? SAX event or DOM ?

public class MyTransformer
extends AbstractDOMTransformer
implements Transformer, DOMBuilder.Listener, Composable, Disposable,
Recyclable {
public void setup(
SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
throws ProcessingException, SAXException, IOException {
}
public void parameterize(Parameters parameters) throws 
ParameterException {
}
protected Document transform(Document doc) {
doc = this.builder.getDocument();
return doc;
}
}

-Original Message-
From: Reuben Christie [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 11:58 AM
To: Cocoon Apache
Subject: how to create XML DOM from SAX event
Hi all, I m currently writing custom transformer  to connect to external
java program from cocoon. i m stuck here where i need to convert the sax
event into xml DOM object.
I use file generator to read from xml file and then pass it to the
transformer(my custome transformer) in pipeline in this transformer i want
to create the original xml file (anything, either string or DOM object). can
anybody help me out and throw me some ideas how to do that?
anyhelp will be grtly appriciated
thanks alot in advance
reuben
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ojb in flow

2003-12-10 Thread Antonio Gallardo
Michael Wolf dijo:
 My question was more about the flow.

 To use the PersistenceBroker I tried:

 importClass(Packages.org.apache.ojb.broker.PersistenceBroker);
 importClass(Packages.org.apache.ojb.broker.PersistenceBrokerFactory);
 importClass(Packages.org.apache.ojb.broker.util.ui.AsciiSplash);

 function ojbTest(){
 broker = PersistenceBrokerFactory.defaultPersistenceBroker();
 }

 when calling the function I get the following error message:
 java.lang.NoClassDefFoundError

Ok. I understand. To be honest I don't use OJB inside javascript, because
it turns to me to be hardly debugable. Note I don't said you can not debug
javascript at all.

Also it looks very complicated to me. I prefer to build a serie of handler
and call them from inside the flow. As a Java IDE I use eclipse
(http://www.eclipse.org/)

In eclipse I create a project with the following libs:

db.jar -- created using druid - it is a container for JDO beans.
(autogenerated).
jdo.jar
jdori.jar
cocoon-ojb-block.jar
avalon-framework.jar
commons-lang-2.0.jar
commons-beanutils-1.6.1.jar (optional)
commons-jxpath-20030909.jar (optional)
db-ojb-1.0rc520031210.jar

most of the libs are from cocoon.

Then I build a dbHandler.jar with the Handler classes (one for each woody
form) using eclipse.org.

Copy the dbHandler.jar to your WEB-INF/lib and restart tomcat.

After that we can call the classes from dbHandler.jar from inside script.

Example, this script manage the creation of a user:

cocoon.load(resource://org/apache/cocoon/woody/flow/javascript/woody2.js);
cocoon.load(context://resources/flow/autentificar.js);

function createform(form) {
if (autorizar(auth)) {
form.showForm(create-form-display);

var bean = new Packages.net.agssa.sga.Auth_user();
var handler = new
Packages.net.agssa.sga.forms.auth_user.Auth_userHandler();
var factory;

form.save(bean);
try {
factory =
cocoon.getComponent(Packages.org.apache.cocoon.ojb.jdo.components.JdoPMF.ROLE);

handler.insert(bean, factory);
} finally {
cocoon.releaseComponent(factory);
}
success(Users, Users inserted successfully, Create a another
user?,create);
}
}

BTW, the Handler written in javascript will look very ugly to my eyes.
This is my view point.

I hope this would help. If not feel free to ask again :-D

Best Regards,

Antonio Gallardo

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



Re: Access session user data from flow

2003-12-10 Thread Antonio Gallardo
Jeremy Quinn dijo:
 fine by me . so maybe we had better move this thread over to the
 dev list . ??

Yep. Let's go there. :-DDD

Best Regards,

Antonio Gallardo


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



Re: How to nest logicsheet tags of different libraries

2003-12-10 Thread Christopher Painter-Wakefield




seems like it maybe should be using getNodeValue() instead of
getFirstChild().getNodeValue(), but I'm not familiar with the
xsp-session-fw stuff (I'm not on C2.1 yet).

The obvious workaround would seem to be

org.w3c.dom.DocumentFragment fragment =
  xsp-session-fw:getxml as=object context=authentication
path=/authentication/data/name/;
blocker:setfragment.getNodeValue()/blocker:set

I also wonder what would happen if you did

blocker:set
  xsp:expr
xsp-session-fw:getxml as=object context=authentication
path=/authentication/data/name/
  /xsp:expr
/blocker:set

which would wrap a String.valueOf() around the DocumentFragment.

-Christopher



|-+
| |   Stephanie   |
| |   Zohner  |
| |   stephanie.zohner|
| |   @gmx.at |
| ||
| |   12/10/2003 04:45 |
| |   AM   |
| |   Please respond to|
| |   users|
| ||
|-+
  
--|
  |
  |
  |   To:   [EMAIL PROTECTED]  
|
  |   cc:  
  |
  |   Subject:  Re: How to nest logicsheet tags of different libraries 
  |
  
--|




Thanks a lot, that was the solution, however now I have another problem.

xsp-session-fw:getxml as=string context=authentication
path=/authentication/data/name/

returns not the whole string, I put in the authentication context, but only
the first 7 chars, or so .
For example, when I put Stephanie Zohner in the context, only Stephan
is
returned.

I looked into the generated Java Code. This is the code fragment, that is
generated out of the xsp-session-fw:getxml Tag.

XSPSessionFwHelper.getXML(this.manager,
String.valueOf(authentication),

String.valueOf(/authentication/data/name))).getFirstChild().getNodeValue())

  );

It takes only the first child node of the returned XML Fragment. However
Stephanie Zohner is shared among 3 child nodes.Taking only the first node
results in extracting only the first of three parts of my name.

This happens when I use the as= 'string'. If I use as= 'object' I would
get the entire string, but then again I get an eeption (as you have
predicted), because a String is expected by the my method and not an
DocumentFragment.

Is it a bug, that only the first node is taken when using the attribute
''as
= 'string''?

Are there any work arounds?


Thanks in advance,

Stephanie




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



Re: How to nest logicsheet tags of different libraries

2003-12-10 Thread Stephanie Zohner
Hi,

 
 
 
 
 seems like it maybe should be using getNodeValue() instead of
 getFirstChild().getNodeValue(), but I'm not familiar with the
 xsp-session-fw stuff (I'm not on C2.1 yet).
 
 The obvious workaround would seem to be
 
 org.w3c.dom.DocumentFragment fragment =
   xsp-session-fw:getxml as=object context=authentication
 path=/authentication/data/name/;
 blocker:setfragment.getNodeValue()/blocker:set

This causes the String to be null, because getNodevalue() returns null.
:-(

 
 I also wonder what would happen if you did
 
 blocker:set
   xsp:expr
 xsp-session-fw:getxml as=object context=authentication
 path=/authentication/data/name/
   /xsp:expr
 /blocker:set

This has the same effect as 'as=string' without the xsp:expr tag around.
:-(

 
 which would wrap a String.valueOf() around the DocumentFragment.
 
 -Christopher
 
 
 
 |-+
 | |   Stephanie   |
 | |   Zohner  |
 | |   stephanie.zohner|
 | |   @gmx.at |
 | ||
 | |   12/10/2003 04:45 |
 | |   AM   |
 | |   Please respond to|
 | |   users|
 | ||
 |-+
  

--|
   |   
   |
   |   To:   [EMAIL PROTECTED]   
   |
   |   cc: 
   |
   |   Subject:  Re: How to nest logicsheet tags of different libraries
   |
  

--|
 
 
 
 
 Thanks a lot, that was the solution, however now I have another problem.
 
 xsp-session-fw:getxml as=string context=authentication
 path=/authentication/data/name/
 
 returns not the whole string, I put in the authentication context, but
 only
 the first 7 chars, or so .
 For example, when I put Stephanie Zohner in the context, only Stephan
 is
 returned.
 
 I looked into the generated Java Code. This is the code fragment, that is
 generated out of the xsp-session-fw:getxml Tag.
 
 XSPSessionFwHelper.getXML(this.manager,
 String.valueOf(authentication),
 

String.valueOf(/authentication/data/name))).getFirstChild().getNodeValue())
 
   );
 
 It takes only the first child node of the returned XML Fragment. However
 Stephanie Zohner is shared among 3 child nodes.Taking only the first
 node
 results in extracting only the first of three parts of my name.
 
 This happens when I use the as= 'string'. If I use as= 'object' I
 would
 get the entire string, but then again I get an eeption (as you have
 predicted), because a String is expected by the my method and not an
 DocumentFragment.
 
 Is it a bug, that only the first node is taken when using the attribute
 ''as
 = 'string''?
 
 Are there any work arounds?
 
 
 Thanks in advance,
 
 Stephanie
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



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



Bug in session-fw logicsheet (?)

2003-12-10 Thread Stephanie Zohner
Hi,

I came accross the following problem recently, and I would like to know if
this is a bug in Session-Fw:

If you put a longer String in the session context e.g. authentication data
like
...
data
  fullnameStephanie Zohner/fullname
/data


and you try to retrieve it within an XSP-Page with

xsp-session-fw:getxml as=string context=authentication
path=/authentication/data/fullname/

You don't get the whole String but only the first 6 chars or so, e.g.
Stephan, the rest is ignored.

The reason is the attribute as='string', which causes the  Tag
xsp-session-fw:getxml as=string context=authentication
path=/authentication/data/fullname/ to be transformed to

XSPSessionFwHelper.getXML(this.manager,
String.valueOf(authentication),
 


String.valueOf(/authentication/data/name))).getFirstChild().getNodeValue();

However, the String Stephanie Zohner is not in one single (child) node,
but in 3 nodes. So the first Child Node Value includes only the first of 3
parts of the string.

I guess that this is not wanted, isn't it?


Regards,

Stephanie

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



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



Re: How to nest logicsheet tags of different libraries

2003-12-10 Thread Christopher Painter-Wakefield




Too bad.  I guess you'll have to construct the String manually by iterating
over the child nodes of the DocumentFragment yourself.  Check out the API
at
http://java.sun.com/j2se/1.4.1/docs/api/org/w3c/dom/Node.html

-Christopher



|-+
| |   Stephanie   |
| |   Zohner  |
| |   stephanie.zohner|
| |   @gmx.at |
| ||
| |   12/10/2003 10:19 |
| |   AM   |
| |   Please respond to|
| |   users|
| ||
|-+
  
--|
  |
  |
  |   To:   [EMAIL PROTECTED]  
|
  |   cc:  
  |
  |   Subject:  Re: How to nest logicsheet tags of different libraries 
  |
  
--|




Hi,





 seems like it maybe should be using getNodeValue() instead of
 getFirstChild().getNodeValue(), but I'm not familiar with the
 xsp-session-fw stuff (I'm not on C2.1 yet).

 The obvious workaround would seem to be

 org.w3c.dom.DocumentFragment fragment =
   xsp-session-fw:getxml as=object context=authentication
 path=/authentication/data/name/;
 blocker:setfragment.getNodeValue()/blocker:set

This causes the String to be null, because getNodevalue() returns null.
:-(


 I also wonder what would happen if you did

 blocker:set
   xsp:expr
 xsp-session-fw:getxml as=object context=authentication
 path=/authentication/data/name/
   /xsp:expr
 /blocker:set

This has the same effect as 'as=string' without the xsp:expr tag around.
:-(


 which would wrap a String.valueOf() around the DocumentFragment.

 -Christopher



 |-+
 | |   Stephanie   |
 | |   Zohner  |
 | |   stephanie.zohner|
 | |   @gmx.at |
 | ||
 | |   12/10/2003 04:45 |
 | |   AM   |
 | |   Please respond to|
 | |   users|
 | ||
 |-+


--|

   |

   |
   |   To:   [EMAIL PROTECTED]

   |
   |   cc:

   |
   |   Subject:  Re: How to nest logicsheet tags of different
libraries
   |


--|





 Thanks a lot, that was the solution, however now I have another problem.

 xsp-session-fw:getxml as=string context=authentication
 path=/authentication/data/name/

 returns not the whole string, I put in the authentication context, but
 only
 the first 7 chars, or so .
 For example, when I put Stephanie Zohner in the context, only Stephan
 is
 returned.

 I looked into the generated Java Code. This is the code fragment, that is
 generated out of the xsp-session-fw:getxml Tag.

 XSPSessionFwHelper.getXML(this.manager,
 String.valueOf(authentication),


String.valueOf(/authentication/data/name))).getFirstChild().getNodeValue())


   );

 It takes only the first child node of the returned XML Fragment. However
 Stephanie Zohner is shared among 3 child nodes.Taking only the first
 node
 results in extracting only the first of three parts of my name.

 This happens when I use the as= 'string'. If I use as= 'object' I
 would
 get the entire string, but then again I get an eeption (as you have
 predicted), because a String is expected by the my method and not an
 DocumentFragment.

 Is it a bug, that only the first node is taken when using the attribute
 ''as
 = 'string''?

 Are there any work arounds?


 Thanks in advance,

 Stephanie




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


--
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



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

Re: How to nest logicsheet tags of different libraries

2003-12-10 Thread Stephanie Zohner
Hi just had the same idea, and it works (of course).

here my solution.

org.w3c.dom.DocumentFragment fragment = xsl:copy-of select=node()/;
StringBuffer name = new StringBuffer();
for(int i = 0; ilt; fragment.getChildNodes().getLength(); 
i++){

name.append(fragment.getChildNodes().item(i).getNodeValue());   
}   
BlockerHelper.getInstance().setEditorName(name.toString());

Thanks a lot for your support,

However I think that this is rather a bug than a feature.

Have fun with Cocoon in the future,

Regards,

Stephanie

 
 
 
 
 Too bad.  I guess you'll have to construct the String manually by itera
 ting
 over the child nodes of the DocumentFragment yourself.  Check out the A
 PI
 at
 http://java.sun.com/j2se/1.4.1/docs/api/org/w3c/dom/Node.html
 
 -Christopher
 
 
 
 |-+
 | |   Stephanie   |
 | |   Zohner  |
 | |   stephanie.zohner|
 | |   @gmx.at |
 | ||
 | |   12/10/2003 10:19 |
 | |   AM   |
 | |   Please respond to|
 | |   users|
 | ||
 |-+
   
 --|
   |
   |
   |   To:   [EMAIL PROTECTED]
   |
   |   cc:  
   |
   |   Subject:  Re: How to nest logicsheet tags of different librar
 ies   |
   
 --|
 
 
 
 
 Hi,
 
 
 
 
 
  seems like it maybe should be using getNodeValue() instead of
  getFirstChild().getNodeValue(), but I'm not familiar with the
  xsp-session-fw stuff (I'm not on C2.1 yet).
 
  The obvious workaround would seem to be
 
  org.w3c.dom.DocumentFragment fragment =
xsp-session-fw:getxml as=object context=authentication
 
  path=/authentication/data/name/;
  blocker:setfragment.getNodeValue()/blocker:set
 
 This causes the String to be null, because getNodevalue() returns nul
 l.
 :-(
 
 
  I also wonder what would happen if you did
 
  blocker:set
xsp:expr
  xsp-session-fw:getxml as=object context=authentic
 ation
  path=/authentication/data/name/
/xsp:expr
  /blocker:set
 
 This has the same effect as 'as=string' without the xsp:expr tag ar
 ound.
 :-(
 
 
  which would wrap a String.valueOf() around the DocumentFragment.
 
  -Christopher
 
 
 
  |-+
  | |   Stephanie   |
  | |   Zohner  |
  | |   stephanie.zohner|
  | |   @gmx.at |
  | ||
  | |   12/10/2003 04:45 |
  | |   AM   |
  | |   Please respond to|
  | |   users|
  | ||
  |-+
 
 
 --
 |
 
|
 
|
|   To:   [EMAIL PROTECTED]
 
|
|   cc:
 
|
|   Subject:  Re: How to nest logicsheet tags of different
 libraries
|
 
 
 --
 |
 
 
 
 
 
  Thanks a lot, that was the solution, however now I have another probl
 em.
 
  xsp-session-fw:getxml as=string context=authentication
  path=/authentication/data/name/
 
  returns not the whole string, I put in the authentication context, bu
 t
  only
  the first 7 chars, or so .
  For example, when I put Stephanie Zohner in the context, only Step
 han
  is
  returned.
 
  I looked into the generated Java Code. This is the code fragment, tha
 t is
  generated out of the xsp-session-fw:getxml Tag.
 
  XSPSessionFwHelper.getXML(this.manager,
  String.valueOf(authentication),
 
 
 String.valueOf(/authentication/data/name))).getFirstChild().getNodeVa
 lue())
 
 
);
 
  It takes only the first child node of the returned XML Fragment. Howe
 ver
  Stephanie Zohner is shared among 3 child nodes.Taking only the firs
 t
  node
  results in 

Re: [PROBLEM] Encoding UTF-8 or ISO-8859-1

2003-12-10 Thread Lionel Crine
I found some answers but not all.

I miss one thing.
When i create a document from an xsp (parameters comes from a post), the 
flow is encoded twice is that normal ?



At 15:13 10/12/2003 +0100, you wrote:
Hi,

I' have some real problems to with my encoding.

My application get some parameters from the form and create a document 
with an xsp.
After that, I'm using DOM and SAX transformers, generators, etc ... to 
manipulate the XML document.

I'm trying to figure out, what should I configure to get the special 
characters (§, °, etc ...) to work.

For example,

With the ° character, I tried several ways to encode but none works.

If I have ° encoding in UTF-8. IE display it like that.
If I have ° encoding in ISO-8859-1, IE understand but the the transformers 
or generators don't understand and modify it in ? (custom SAX Transformer 
do that) or ° (custom DOM transformer do that).
In my SAX transformer, I did not specify some special encodingor 
characters mappings).
In my DOM transformer, I have to get the Stream and put it in a 
DOM the serialize it, usually I write :

 docString = 
org.apache.cocoon.xml.XMLUtils.serializeNode(doc, this.formatModification);
 byte[] bytesDoc = docString.trim().getBytes(UTF-8);



I want my cocoon to use only UTF-8 encoding. Is there a stable way to do 
this ?

I read some articles on wiki and try to find a solution but it doesn't work.

Articles I have read.
- RequestParameterEncoding
- outputencoding
Any help would be really appreciate.

Lionel





Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: flow: how to upload images into a database

2003-12-10 Thread Christopher Oliver
var BUFSIZE = 8192;
// You can allocate a Java byte array like this
var buf = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, BUFSIZE);
var os = new java.io.ByteArrayOutputStream();
var count;
while ((count = result.read(buf, 0, buf.length))  0) {
 os.write(buf, 0, count);
}
os.flush();
var image = os.toByteArray();
Joern Wallstabe wrote:

On Tue, 09 Dec 2003 14:56:20 +0100
Christian Haul [EMAIL PROTECTED] wrote:
 

Joern Wallstabe wrote:

   

or can I use 
convert, setColumn etc.  from  org.apache.cocoon.util.JDBCTypeConversions ??
 

Guess so. But the input object must be of a supported type (the sample 
uses the raw-request-param module for this).

	Chris.

   

Hello Chris,
thanks for the quick reply.
To get the image into the database i'm using the following
importPackage(Packages.org.apache.cocoon.util);
   if (my_image != null) { 
	var ps=conn.prepareStatement(UPDATE my_table SET image=? WHERE image_id=?);
	ps.setString(2,imageID); 
	ps.setBinaryStream(1,my_image,my_image_size);
	ps.executeUpdate();
	ps.close();	
   }



To get the image out:

importPackage(Packages.org.apache.cocoon.util);
   var ps=conn.prepareStatement(SELECT image  FROM my_table WHERE image_id=?);
   ps.setString(1,imageID);
   var rs= ps.executeQuery();
 
   if (rs!= null){
	if(rs.next()){
		var result = rs.getBinaryStream(1);		
	}
	rs.close();
   }
   ps.close();	


How to I have to process the resulting bytearray (var result = rs.getBinaryStream(1);) to get an  image back ?

Regards jörn



-
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: Authentication and Autorization

2003-12-10 Thread Ralph Goers
The Cocoon authentication framework does not provide the generator or
PermissionSelector I described below.  I wrote those two components for our
needs.  Sorry if I misled you, but I was trying to illustrate how you can
tie Cocoon's authentication framework to your own.  Basically, you need to
write a generator.  The documentation on the authentication framework is at
http://cocoon.apache.org/2.1/developing/webapps/authentication.html.

As far as redirecting to different pages based upon permissions, that is
only one possibility.  It is entirely possible to pass permissions as XML
into a stylesheet to cause the page to be generated differently based on
permissions.

Ralph

 -Original Message-
 From: Gianluca Sartori [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 10, 2003 12:05 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Authentication and Autorization
  
 
 So I use a generator to get User info. Then with the 
 PermissionSelector
 I can decide what to do. Uhmm, This means I must redirect to different
 pages depending on permission owned by the user? (stupid question, I
 know, but I'm still studying cocoon, it's a big beast...). 
 Sometimes it
 is useful to move the logic from the sitemap into the page and take
 decision in there instead of having multiple pages for each user type.
 Or at least, this is what I've done till now. Probably is not so
 different, anyway.
 
  The second component is a PermissionSelector which is very 
 similar to the
  ExceptionSelector. When configuring the selector you define 
 the permissions
  that can be checked and then the selector actually checks 
 to see if the end
  user has the requested permission. The selector uses the 
 object saved in the
  session by the generator to do the permission check.
 
 I'll check. Could you point me to some documentation if it exists?
 
 
 Thanks for all,
 Gianluca
  
  
  Ralph
  
   -Original Message-
   From: Gianluca Sartori [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, December 09, 2003 7:08 AM
   To: [EMAIL PROTECTED]
   Subject: Authentication and Autorization
   
   
   Hi all,
   
 I'm adapting an authentication/authorization system we 
   are using within
   normal JSP/servet pages. It consists of a simple class 
 which must be
   instantiated at the beginning of the page. It knows where 
 to redirect
   the user for authentication and within the JSP/Servlet 
 you can use its
   methods to get user information such as the username, fullname,
   telephone, etc.
   
   What's the best place to incapsulate the funcionalities 
   provided by this
   class? I'm buiding an action for authentication purposes 
 and I plan to
   develop a logicsheet to incapsulate authorization 
 primitives so I can
   declaratively decide whether to make available some data or not
   depending on the current user role.
   
   Is this the way to go? I thought about incapsulate my 
 class into an
   action, but this way I don't know how to take 
 authorization decisions.
   For example I need one edit link if the user has the 
 Editors role,
   but none if s/he has the User role. I don't want to create two
   different pages for this.
   
   Any help?
   
   Thanks,
   Gianluca
   
   -- 
   Gianluca Sartori ELIS - SIE - 
 Software Development
   
   Via Sandro Sandri, 81 (tel) +39 
 06.43.56.03.55
   00159 Rome - Italy(fax) +39 
 06.43.56.03.99
   
   
   
   
 -
   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]
 -- 
 Gianluca Sartori ELIS - SIE - Software Development
 
 Via Sandro Sandri, 81 (tel) +39 06.43.56.03.55
 00159 Rome - Italy(fax) +39 06.43.56.03.99
 
 
 
 -
 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]



jar/zip file directory generator?

2003-12-10 Thread Joakim Verona
Hello,

Is there a way to generate a listing of files within a jar or zip file?

I tried using the directory generator using the jar: protocol like this:

 !--  --
 !-- jar tst   --
 !--  --
 map:match pattern=tst.dir/**
 map:generate  type=directory 
src=jar:/net/media/ebooks/test.zip!

 /map:generate
 map:serialize/
 /map:match
...which doesn't work.

Maybe an archive listing directory generator would be more consistent 
with the image directory and mp3 directory generators.
Is there one, or should I try writing one?

/Joakim

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


Cocoon 2.1.3 - IllegalStateException:disposed ComponentLocator with webdav mounts

2003-12-10 Thread Christian Mayrhuber
Hi,

If I access the /samples/ page with only one client, everything goes 
right, if I access it with two or more concurrent clients I get lots
of IllegalStateExceptions.
Everything goes well with parallel execution if I do not mount the 
samples remote, but use the FileSource. Is there some concurrency 
problem in ECM?

To reproduce:
Copy the cocoon-2.1.3 samples onto a webdav server and mount this 
directory with the webdav protocol in the webapp sitemap.
map:match pattern=samples/**
   map:mount check-reload=yes 
src=webdav://fiicmpc141.tu-graz.ac.at:8080/samples/{1} 
uri-prefix=samples/{1}/
/map:match

Apache Bench was used to test concurrency:
ab -n20 -c1 http://cocoonhost:/samples/ succeeds with no errors
ab -n20 -c2 http://cocoonhost:/samples/ fails with 
IllegalStateExceptions

System is SMP RedHat 7.3 with latest RHSA 2.4.20 kernel.

Java VM is
java version 1.4.2_02
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
Java HotSpot(TM) Server VM (build 1.4.2_02-b03, mixed mode)
with LD_ASSUME_KERNEL=2.2.5
The Servlet Container is Jetty/4.2.9, cocoon default.

java.lang.IllegalStateException: You cannot lookup components on a 
disposed ComponentLocator
at 
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(ExcaliburComponentManager.java:201)
at 
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentManager.java:324)
at 
org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.invokeErrorHandler(ErrorHandlerHelper.java:100)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:189)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:152)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:354)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
at org.apache.cocoon.Cocoon.process(Cocoon.java:656)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
at org.mortbay.http.HttpServer.service(HttpServer.java:863)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
--
lg, Chris

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


cocoon-blank.war II

2003-12-10 Thread Patrick Hess
Hi Cocoon-Users,

I followed the threads about a blank cocoon.war and I can understand the 
arguments of the people voting agains something like this and I can 
understand the problem some users have. When I started in the area of 
web applications it was often hard for me to solve even the simplest 
problems -- having such an option would have saved me lots of hours of work.

So yesterday evening I started to hack a small project that I would like 
to introduce now and get some feedback - maybe it will again this week 
if you convince me :)

My idea was to offer cocoon creator. It's a web application (at the of 
this writing in PHP -- I will convert it to cocoon if the concept is 
good enough) asking you some build-specific question (JDK to build, 
Cocoon version, blocks to include). Based on this information it will 
start to build a customized version of cocoon and offer it to download 
to user.

The basics are there and I'm happy with current state. This evening I 
will do some polishing and hope to get somebody of you for testing and 
critics. This is why I'm NOT going to publish the URL right now.

I really really enjoy cocoon and for me it's the best piece of software 
in terms of web publishing that I've found in the last years so this may 
be a way to give back something to the cocoon community until my cocoon 
skills are good enough to give back some really usefull stuff :)))

Because of time needed to build a complete .war file I'm running only 
one build at the same time so it may take a while until the user really 
gets the file. Because of the bandwidth I will also restrict the amount 
of downloads to around 20-30 per day (or 1000 per month, don't know yet...)

If someone is interested in testing this app please contact me and I 
will send you the URL.

Any other comments, flames or ideas are also welcome!

Thanks for your time...
--
Patrick Hess


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


external executables

2003-12-10 Thread rufio
Hi!

I'm looking for way to run a program using CGI.
I probably could write a generator to do that but maybe there is one already?

Regards, Rufio
-- 
010 nmap -O www.microsoft.com
001 [..]
111 Running: Linux 2.5.X

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



uri-include problem

2003-12-10 Thread Jeff Sexton

On my Cocoon 2.0.4 install, this works fine in an xsp:

util:include-uri href=http://host/path//

However, if I write it this way:

util:include-uri href=http://host/path/;
/util:include-uri

I get an error:

Stopping after fatal error: Element type util:include-uri must be
followed by either attribute specifications,  or /.

Any ideas?

Also, what I am working toward is including a uri that will need to take a
dynamic parameter.  I need to encode this parameter as it may contain
spaces, , % etc.

Something like

util:include-uri href=http://host/path/file?A=ABC+123/

Where ABC 123 has been retreived in a logic block in the xsp.  How can I
structre the include-uri so as to concatinate the parameter, and how can I
encode the special characters?

(I'm doing this so as to access an old cgi program)

Thanks!


-
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com

This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.




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



Chaperone csv conversion example problem (Blocks)

2003-12-10 Thread Johan Kok
Just noitced that the second row of the spreadsheet data dissapears when 
processing the information for display.in the sample. Has that been 
fixed yet? If so, could someone forward the fix, please?

JK

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


Re: cocoon-blank.war II

2003-12-10 Thread Scherler, Thorsten
Patrick Hess wrote:

If someone is interested in testing this app please contact me and I 
will send you the URL.
Very nice. I would love to try it!

Any other comments, flames or ideas are also welcome!
Comments and ideas I can provide, let somebody else flames u ;-)

Thanks for your time...


--
thorsten
 nameThorsten Scherler/name
 countrySpain/country
 @mail [EMAIL PROTECTED]/@mail
 @cocoon-WIKI 
http://wiki.cocoondev.org/Wiki.jsp?page=Scherler/@cocoon-WIKI
 httphttp://www.target-x.de/http
/thorsten



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


status generator

2003-12-10 Thread Kumar M

Hello!

Cocoon 1.8.2 with the "status" url, shows the versions of the Xerces and Xalan currently being used. However with the cocoon 212, the "status.html" does not show the versions of the xml parser and xslt processor. Has anyone upgraded the status generator to get these details?

Thanks
kumar
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

Re: [Flowscript] Obtaining servlet context directory

2003-12-10 Thread Joe Latty
In your pipeline
map:parameter name=context-path value={request:contextPath}/
In flowscript
var contextPath = cocoon.parameters[context-path];

- Original Message - 
From: Peter Velychko [EMAIL PROTECTED]
To: Andreas Hartmann [EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 11:49 PM
Subject: Re: [Flowscript] Obtaining servlet context directory


 Hi,

 Excuse me I don't know about better way.
 But my question is about context directory in case of application
 works from WAR-archive.

 In that case if I have
 var sourceFile =
Packages.org.apache.excalibur.source.SourceUtil.getFile(source);
 the sourceFile is null.

 Could anyone advice right way?

 Thanks a lot in advance.

 Andreas wrote:

 AH Hi Cocoon users,

 AH I'm looking for an easy way to obtain the directory
 AH of the servlet context in a flowscript. Is there any
 AH reason why context.getRealPath() in FOM_Cocoon is not
 AH (yet?) implemented?

 AH By now I'm doing


 AH var sourceResolver = cocoon.getComponent(
 AH  Packages.org.apache.excalibur.source.SourceResolver.ROLE);

 AH var source = sourceResolver.resolveURI(context:///);
 AH var sourceFile =
 AH  Packages.org.apache.excalibur.source.SourceUtil.getFile(source);
 AH var contextPath = sourceFile.getAbsolutePath();

 AH sourceResolver.release(source);
 AH cocoon.releaseComponent(sourceResolver);


 AH Is there something shorter and more elegant?

 AH Thanks in advance,
 AH -- Andreas


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


 Best regards,
 Peter Velychko
 [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]



Re: [Flowscript] Obtaining servlet context directory

2003-12-10 Thread Andreas Hartmann
Joe Latty wrote:
In your pipeline
map:parameter name=context-path value={request:contextPath}/
In flowscript
var contextPath = cocoon.parameters[context-path];
Thanks for your answer, but I don't mean the context
path of the request but the absolute filesystem path
to the web application directory.
-- Andreas

- Original Message - 
From: Peter Velychko [EMAIL PROTECTED]
To: Andreas Hartmann [EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 11:49 PM
Subject: Re: [Flowscript] Obtaining servlet context directory



Hi,

Excuse me I don't know about better way.
But my question is about context directory in case of application
works from WAR-archive.
In that case if I have
var sourceFile =
Packages.org.apache.excalibur.source.SourceUtil.getFile(source);

the sourceFile is null.

Could anyone advice right way?

Thanks a lot in advance.

Andreas wrote:

AH Hi Cocoon users,

AH I'm looking for an easy way to obtain the directory
AH of the servlet context in a flowscript. Is there any
AH reason why context.getRealPath() in FOM_Cocoon is not
AH (yet?) implemented?
AH By now I'm doing

AH var sourceResolver = cocoon.getComponent(
AH  Packages.org.apache.excalibur.source.SourceResolver.ROLE);
AH var source = sourceResolver.resolveURI(context:///);
AH var sourceFile =
AH  Packages.org.apache.excalibur.source.SourceUtil.getFile(source);
AH var contextPath = sourceFile.getAbsolutePath();
AH sourceResolver.release(source);
AH cocoon.releaseComponent(sourceResolver);
AH Is there something shorter and more elegant?

AH Thanks in advance,
AH -- Andreas
AH -
AH To unsubscribe, e-mail: [EMAIL PROTECTED]
AH For additional commands, e-mail: [EMAIL PROTECTED]
Best regards,
Peter Velychko
[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]


Unit Testing Actions

2003-12-10 Thread Damon van Opdorp
Hi,

Does anyone have any tips for unit testing actions?  Are there any JUnit
extensions for cocoon?  Any other suggestions?

Thanks,

Damon van Opdorp


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



RE: Unit Testing Actions

2003-12-10 Thread Ralph Goers
Use AbstractCompositeTestCase. I have learned more about Avalon by building
unit tests using this than in writing the components themselves.

 -Original Message-
 From: Damon van Opdorp [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 10, 2003 3:50 PM
 To: [EMAIL PROTECTED]
 Subject: Unit Testing Actions
 
 
 Hi,
 
 Does anyone have any tips for unit testing actions?  Are 
 there any JUnit
 extensions for cocoon?  Any other suggestions?
 
 Thanks,
 
 Damon van Opdorp
 
 
 -
 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: Unit Testing Actions

2003-12-10 Thread Damon van Opdorp
Hi All,

I'm having trouble finding AbstractCompositeTestCase.  I can google a
couple of references to it, and it sounds like it does some usefull mock
object donkeywork, but I can't find it in my version of Cocoon, which is
2.1.1.

Anyone know of the replacement to AbstractCompositeTestCase?  Should I
have build my cocoon with difference options?

Cheers,

Damon

On Thu, 2003-12-11 at 13:57, Ralph Goers wrote:
 Use AbstractCompositeTestCase. I have learned more about Avalon by building
 unit tests using this than in writing the components themselves.
 
  -Original Message-
  From: Damon van Opdorp [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 10, 2003 3:50 PM
  To: [EMAIL PROTECTED]
  Subject: Unit Testing Actions
  
  
  Hi,
  
  Does anyone have any tips for unit testing actions?  Are 
  there any JUnit
  extensions for cocoon?  Any other suggestions?
  
  Thanks,
  
  Damon van Opdorp
  
  
  -
  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]



RE: Unit Testing Actions

2003-12-10 Thread Ralph Goers
In your source distribution look in src/test/org/apache/cocoon. After a
build the classes are in build/cocoon-2.1.x/cocoon-testcase.jar.  You will
also want to grab the source and jar for ExcaliburTestcase. It has moved
around between excalibur-testcase and excalibur-component. I'm not sure
where it was in 2.1.1 as I never downloaded that.  FYI, exalibur-testcase is
broken in 2.1.3.  I have a patched version that works but I'm not sure how
to get ahold of the official version.

Ralph

-Original Message-
From: Damon van Opdorp
To: [EMAIL PROTECTED]
Sent: 12/10/2003 5:58 PM
Subject: RE: Unit Testing Actions

Hi All,

I'm having trouble finding AbstractCompositeTestCase.  I can google a
couple of references to it, and it sounds like it does some usefull mock
object donkeywork, but I can't find it in my version of Cocoon, which is
2.1.1.

Anyone know of the replacement to AbstractCompositeTestCase?  Should I
have build my cocoon with difference options?

Cheers,

Damon

On Thu, 2003-12-11 at 13:57, Ralph Goers wrote:
 Use AbstractCompositeTestCase. I have learned more about Avalon by
building
 unit tests using this than in writing the components themselves.
 
  -Original Message-
  From: Damon van Opdorp [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 10, 2003 3:50 PM
  To: [EMAIL PROTECTED]
  Subject: Unit Testing Actions
  
  
  Hi,
  
  Does anyone have any tips for unit testing actions?  Are 
  there any JUnit
  extensions for cocoon?  Any other suggestions?
  
  Thanks,
  
  Damon van Opdorp
  
  
 
-
  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]

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



RE: Unit Testing Actions

2003-12-10 Thread Ralph Goers
I should have also mentioned that for examples of unit testing actions you
should look in src/test/org/apache/cocoon/acting. You will see unit tests
for RequestParamAction and ResourceExsitsAction.  As an aside, I have to
wonder where the unit tests for all the other actions are?

Ralph

-Original Message-
From: Ralph Goers
To: 'Damon van Opdorp '; '[EMAIL PROTECTED] '
Sent: 12/10/2003 7:25 PM
Subject: RE: Unit Testing Actions

In your source distribution look in src/test/org/apache/cocoon. After a
build the classes are in build/cocoon-2.1.x/cocoon-testcase.jar.  You
will also want to grab the source and jar for ExcaliburTestcase. It has
moved around between excalibur-testcase and excalibur-component. I'm not
sure where it was in 2.1.1 as I never downloaded that.  FYI,
exalibur-testcase is broken in 2.1.3.  I have a patched version that
works but I'm not sure how to get ahold of the official version.

Ralph

-Original Message-
From: Damon van Opdorp
To: [EMAIL PROTECTED]
Sent: 12/10/2003 5:58 PM
Subject: RE: Unit Testing Actions

Hi All,

I'm having trouble finding AbstractCompositeTestCase.  I can google a
couple of references to it, and it sounds like it does some usefull mock
object donkeywork, but I can't find it in my version of Cocoon, which is
2.1.1.

Anyone know of the replacement to AbstractCompositeTestCase?  Should I
have build my cocoon with difference options?

Cheers,

Damon

On Thu, 2003-12-11 at 13:57, Ralph Goers wrote:
 Use AbstractCompositeTestCase. I have learned more about Avalon by
building
 unit tests using this than in writing the components themselves.
 
  -Original Message-
  From: Damon van Opdorp [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 10, 2003 3:50 PM
  To: [EMAIL PROTECTED]
  Subject: Unit Testing Actions
  
  
  Hi,
  
  Does anyone have any tips for unit testing actions?  Are 
  there any JUnit
  extensions for cocoon?  Any other suggestions?
  
  Thanks,
  
  Damon van Opdorp
  
  
 
-
  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]

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



Re: cocoon-blank.war II

2003-12-10 Thread Johan Kok
Partick,

I really like the direction you are choosing, as I believe a lot can be 
done to bring userfriendly front-ends to cocoon. I am also using forrest 
and had similar thoughts there. - I would be a user of such.With a bit 
of Forrest background I recently started working on Cocoon and had a 
torred time obtaining a simple environment to work from - missed the 
myapp sample until most were done.



Patrick Hess wrote:

Hi Cocoon-Users,

I followed the threads about a blank cocoon.war and I can understand 
the arguments of the people voting agains something like this and I 
can understand the problem some users have. When I started in the area 
of web applications it was often hard for me to solve even the 
simplest problems -- having such an option would have saved me lots of 
hours of work.

So yesterday evening I started to hack a small project that I would 
like to introduce now and get some feedback - maybe it will again this 
week if you convince me :)

My idea was to offer cocoon creator. It's a web application (at the of 
this writing in PHP -- I will convert it to cocoon if the concept is 
good enough) asking you some build-specific question (JDK to build, 
Cocoon version, blocks to include). Based on this information it will 
start to build a customized version of cocoon and offer it to download 
to user.

The basics are there and I'm happy with current state. This evening I 
will do some polishing and hope to get somebody of you for testing and 
critics. This is why I'm NOT going to publish the URL right now.

I really really enjoy cocoon and for me it's the best piece of 
software in terms of web publishing that I've found in the last years 
so this may be a way to give back something to the cocoon community 
until my cocoon skills are good enough to give back some really 
usefull stuff :)))

Because of time needed to build a complete .war file I'm running only 
one build at the same time so it may take a while until the user 
really gets the file. Because of the bandwidth I will also restrict 
the amount of downloads to around 20-30 per day (or 1000 per month, 
don't know yet...)

If someone is interested in testing this app please contact me and I 
will send you the URL.

Any other comments, flames or ideas are also welcome!

Thanks for your time...


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


Re: cocoon-blank.war II

2003-12-10 Thread Geoff Howard
Patrick Hess wrote:
Hi Cocoon-Users,

I followed the threads about a blank cocoon.war and I can understand the 
arguments of the people voting agains something like this and I can 
understand the problem some users have. When I started in the area of 
web applications it was often hard for me to solve even the simplest 
problems -- having such an option would have saved me lots of hours of 
work.
By the way I never mentioned (in this round of the discussion at least)
that I (and I think every committer) understand completely the need and
desire for a binary Cocoon dist.  It's only the impracticality of it as
things stand in 2.1 that has kept it from happening.
So yesterday evening I started to hack a small project that I would like 
to introduce now and get some feedback - maybe it will again this week 
if you convince me :)
great!

My idea was to offer cocoon creator. It's a web application (at the of 
this writing in PHP -- I will convert it to cocoon if the concept is 
good enough) asking you some build-specific question (JDK to build, 
Cocoon version, blocks to include). Based on this information it will 
start to build a customized version of cocoon and offer it to download 
to user.
I have considered doing something like this with Ant which has built in 
support for interactive properties which can also be scripted for later 
rebuilds.  But I think your idea of doing it over the web is worth 
pursuing (except you're stuck paying for the bandwidth).

As I see it, these are the problems people have with the build process:

1) emotional shock at having to build at all.
2) java environment problems (jvm instead of jdk, JAVA_HOME not set, 
endorsed libs problem?)
3) winzip empty libs problem
4) failure to read INSTALL.txt
5) trouble deciphering the options in build.properties and blocks.properties
6) misinterpreting build output (warnings!=failure !)

the web based builder idea helps with all of those, except postpones the 
 problem with java environment (#2).

...

If someone is interested in testing this app please contact me and I 
will send you the URL.
sure - let me know.

Any other comments, flames or ideas are also welcome!
The worst you'll ever get from me is disagreement but don't let that 
bother you.

Geoff

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


Re: cocoon-blank.war II

2003-12-10 Thread Tony Collen
Geoff Howard wrote:

snip

great!

My idea was to offer cocoon creator. It's a web application (at the of 
this writing in PHP -- I will convert it to cocoon if the concept is 
good enough) asking you some build-specific question (JDK to build, 
Cocoon version, blocks to include). Based on this information it will 
start to build a customized version of cocoon and offer it to download 
to user.


I have considered doing something like this with Ant which has built in 
support for interactive properties which can also be scripted for later 
rebuilds.  But I think your idea of doing it over the web is worth 
pursuing (except you're stuck paying for the bandwidth).

As I see it, these are the problems people have with the build process:

1) emotional shock at having to build at all.
2) java environment problems (jvm instead of jdk, JAVA_HOME not set, 
endorsed libs problem?)
3) winzip empty libs problem
4) failure to read INSTALL.txt
5) trouble deciphering the options in build.properties and 
blocks.properties
6) misinterpreting build output (warnings!=failure !)

the web based builder idea helps with all of those, except postpones the 
 problem with java environment (#2).
I remember a friend doing this, but for the Linux kernel :()

This will all be obsolete when 2.2 comes around and we have real 
blocks.  Until then, why not explore some ideas?

Another idea:  Someone should built a naked Cocoon, and we could 
distribute it on BitTorrent.  We'd just need lots of people hosting it.

Tony

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


Re: cocoon-blank.war II

2003-12-10 Thread Geoff Howard
Ok, I was going to sleep, but Tony Collen wrote:

Geoff Howard wrote:
...

I remember a friend doing this, but for the Linux kernel :()

This will all be obsolete when 2.2 comes around and we have real 
blocks.  Until then, why not explore some ideas?

Another idea:  Someone should built a naked Cocoon, and we could 
distribute it on BitTorrent.  We'd just need lots of people hosting it.
IMNVHO the best idea for 2.1 I've heard was briefly mentioned on the 
dev list here: 
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=106208434632320w=2 ;)

... the build step really is a configure step and a
build step rolled into one.  We could probably (now that the JDK
dependencies are fixed) distribute a half built Cocoon, where all
classes are compiled but the webapp is not configured/assembled.  That
would not get you out of having to run ./something.sh|bat target-name to 
do the last step.  ...


I made a stab at this but didn't get very far but I still think it has 
merit and would probably only involve some slight refactoring of the 
build here and there and a new target or two.

If anyone wants to make another go I'd help!

Geoff

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


can woody make client-side validation ?

2003-12-10 Thread Jean-Christophe Kermagoret
Hi,
is it possible to hava client-side validation with the woody framework 
like the struts validator for example ?

--

Jean-Christophe Kermagoret
[EMAIL PROTECTED]


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


RE: Using Cron to call pipelines in background

2003-12-10 Thread Reinhard Poetz

From: Upayavira [mailto:[EMAIL PROTECTED] 

 Dean Cording wrote:
 
  Thanks David,
   
  If you'd like to send me a copy of what you have so far 
 I'll have a go
  at integrating it with the Quartz scheduler.
 
 That would be great. From what I understand, you'd need to 
 get access to 
 the Cocoon object, and prepare an environment, with its request and 
 response objects, and pass that environment to the Cocoon object for 
 processing. Is that correct David?

I move this thread to [EMAIL PROTECTED] because we're talking about
implementation details.

I think so too.
Currently I'm thinking of a new BackgroundThreadEnvironment that will
be responsible for the environment but more opinions on this are
welcome.

(I started with this about two weeks ago and had some problems with the
Context object but I hope I have some more time tomorrow to find out my
concrete problem)
Unfortunatly I can't check in ATM because I'm working in a customer's
office and the firewall doesn't allow SSH access but I'll talk to the
firewall administrator in the afternoon ;-)

Cheers and thanks for your engagement!
Reinhard

P.S. I'm going to add a pointer to the Bugzilla issue!
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25384)

 -Original Message-
 From: Upayavira [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, December 10, 2003 11:18 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Using Cron to call pipelines in background
 
 
 Dean Cording wrote:
 
  Thanks David,
   
  If you'd like to send me a copy of what you have so far 
 I'll have a go
  at integrating it with the Quartz scheduler.
 
 That would be great. From what I understand, you'd need to 
 get access to 
 the Cocoon object, and prepare an environment, with its request and 
 response objects, and pass that environment to the Cocoon object for 
 processing. Is that correct David?
 
 Upayavira
 
   
  Cheers,
   
  Dean
 
  -Original Message-
  *From:* David Kavanagh [mailto:[EMAIL PROTECTED]
  *Sent:* Wednesday, 10 December 2003 2:57 PM
  *To:* [EMAIL PROTECTED]
  *Subject:* Re: Using Cron to call pipelines in background
 
  BTW, I have a version working under 2.1 now, but stopped working
  on it when the Quartz scheduler was integrated. I figured if our
  app needed to migrate to 2.1, I'd just add features to the
  integrated scheduler to match what my task manager does.
 
  David
 
  PS. I'd be happy to share.
 
  Dean Cording wrote:
 
  Has anyone used the Cron block to invoke a pipeline in the
  background?
   
  I have a requirement to generate and send out via email regular
  reports generated by Cocoon.  Generating the reports 
 and emailing
  them using the Sendmail transformer is the easy bit.  What I'm
  not sure about is how to use Cron to trigger the processing of
  the pipeline.
   
  I've had a look at David Kavanagh's work but the last 
 development
  was that it did not work under 2.1.
   
  Note that this needs to be a self contained 
 application so using
  an external trigger is not an option.
   
  Any hints, guidance, code snippets or complete 
 solutions would be
  much appreciated.
   
   
  Cheers,
   
  Dean
 
 
 
 
 -
 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]