esql:get-string and java String

2004-03-08 Thread Philippe Guillard
Hi,

I found in [EMAIL PROTECTED] archives somebody having the same problem that i
have today, and i don't understand the response given here (Do not know
how to replace CDATA and cd_formula). Can anybody help me?

Regards,

Phil



esql:get-string and java String 
Gabor Bartha  [EMAIL PROTECTED] 
Tue, 01 Oct 2002 11:13:52 +0200

  * Previous message: Sitemap returning blank html page
  * Next message: esql:get-string and java String
  * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]


Hi,

the java code:

String formula =
xspAttr.addAttribute(
  ,
  column,
  column,
  CDATA,
  cd_formula
);
   

this.contentHandler.startElement(
  http://apache.org/cocoon/SQL/v2;,
  get-string,
  esql:get-string,
  xspAttr
);
xspAttr.clear();

   

this.contentHandler.endElement(
  http://apache.org/cocoon/SQL/v2;,
  get-string,
  esql:get-string
);

;



If I try to use double () like this:

String formula = ((String)esql:get-string column=formula/);

I got ')' expected error, the source in this case:


String formula = ((String)
xspAttr.addAttribute(
  ,
  column,
  column,
  CDATA,
  cd_formula
);
   

this.contentHandler.startElement(
  http://apache.org/cocoon/SQL/v2;,
  get-string,
  esql:get-string,
  xspAttr
);
xspAttr.clear();

   

this.contentHandler.endElement(
  http://apache.org/cocoon/SQL/v2;,
  get-string,
  esql:get-string
);

);

Regards,
Gabor

Christian Haul wrote:

On 30.Sep.2002 -- 05:12 PM, Gabor Bartha wrote:
  
Hi,
I want to use the esql:get-string method to initialize a java String
object like this:
xsp:logic
 String formula = esql:get-string column=formula/;
/xsp:logic

But I got incompatible types exception. If I tried to use casting:

xsp:logic
 String formula = (String)esql:get-string column=formula/;
/xsp:logic

I got inconvertible types Exception.
How can I use that variable as a java String object?


I'm puzzled. Could you please post the lines from the resulting javacode generated 
by the XSP? 
Chris.--C h r i s t i a n   H a u l[EMAIL PROTECTED]


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



Re: cocoon minimum library

2004-03-08 Thread Reinhard Pötz
reza x wrote:

hi all
I am using cocoon only for generating html,excel,pdf reports.
what is the minimum cocoon i need.
and hw can i make cocoon minimum for this purpose.
 
thanks alot for your attention.



if you use Cocoon 2.1 copy blocks.properties to local.blocks.properties 
and comment in all blocks you don't want. This will configure *your* 
minimum Cocoon.

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


Re: esql:get-string and java String

2004-03-08 Thread Antonio Gallardo
Try this:

xsp:logic
String formula = xsp:expresql:get-string column=formula//xsp:expr;
/xsp:logic

Best Regards,

Antonio Gallardo


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



cocoon minimum library

2004-03-08 Thread reza x
hi all
I am using cocoon only for generating html,excel,pdf reports.
what is the minimum cocoon i need.
and hw can i make cocoon minimum for this purpose.

thanks alot for your attention.
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.

Re: A my-cocoon.xconf file?

2004-03-08 Thread Upayavira
Pete wrote:

+1 if there is not I've been through this a couple of times
upgrading to new cocoon versions.
I suspect the answer is going to be to use the xpatch ant task
that is used by the cocoon build system to embed block specific
information in the xconf during a cocoon build, but does this
tool support removing or modifying sections?
Yes it does. I use the XConfPatch task in this way.

Upayavira



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


Re: Lucene and output store-fields in search hits

2004-03-08 Thread Jeroen Reijn
Hi Stefan,

You can use the Lucene crawler to index your site. (Look at the Lucene 
sample)
Within the cocoon.xconf you can declare wich document element should be 
stored by the LuceneIndexer.

For example:

component role=org.apache.cocoon.components.search.LuceneXMLIndexer
   
class=org.apache.cocoon.components.search.SimpleLuceneXMLIndexerImpl
   logger=core.search.lucene
   store-fieldstitle/store-fields
/component

The title element will be stored by the LuceneIndexer. Once your crawler 
is finished you can call the search generator for the output.

For example:

Add this to your sitemap:

map:match pattern=search
 map:generate type=search label=content/
 map:serialize type=xml/
/map:match
Get the output with http://yourserver.com/search?queryString=and

This will search the word 'and' in all your documents.

Looking at the output generated by the searchgenerator you will see your 
element is returned.

I hope this helps a bit.

Greetz,

Jeroen



Stefan Geelen schreef:

HI,

I noteiced in the SimpleLuceneXMLIndexerImpl  class that there is a  
store-fields parameter to define which content

Quote:

* p
*   ttlt;store-fields/gt;/tt
*   Sets which tags in your content are stored in Lucene as fields,
*   during the indexing process. Allows them to be output with search 
hits.
* /pp

Now my question is how can I get these fields to be output with search 
hits ?

This is not clear to me and I can't find any documentation about that.

Anyone ?

Regards,

Stefan

_
MSN Search, for relevant search results! http://search.msn.be
-
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]


Entity declaration

2004-03-08 Thread beyaNet Consultancy
Hi,
I have an entity in my page, nbsp;, which when passed through cocoon 
throws an error. How do you handle entities in cocoon?

many thanks in advance

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


Re: Cocoon and soap

2004-03-08 Thread Johnson
Hi:

below is your code!

 xscript:variable name=soap-result
  soap:call
url=http://localhost:8080/axis/services/HelloAxis;
ns1:sayHello xmlns:ns1=urn:HelloAxis
  soap:enc/
  symbol xsi:type=xsd:string
xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance; xmlns:xsd=
/ns1:sayHello
  /soap:call
/xscript:variable

xscript:variable name=stylesheet
  href=stylesheets/soap-hello.xsl/

xscript:transform name=soap-result stylesheet=stylesheet/


notice the symbol end with /ns1:sayHello
because it's not well-format,so system will say something not end,


Johnson



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



RE: Entity declaration

2004-03-08 Thread David Leangen

Hi!

One way, and perhaps the easiest, is to declare your entities somewhere in
your DTD.


Hope this helps.

Dave






 -Original Message-
 From: beyaNet Consultancy [mailto:[EMAIL PROTECTED]
 Sent: March 8, 2004 20:57
 To: [EMAIL PROTECTED]
 Subject: Entity declaration


 Hi,
 I have an entity in my page, nbsp;, which when passed through cocoon
 throws an error. How do you handle entities in cocoon?

 many thanks in advance


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



using URL in map:match

2004-03-08 Thread reza x
hi all
I want use sitemap to get the output stream from a servlet.
my sitemap.xml snippest now is like this:

map:match pattern="*.pdf" map:generate src=""http://localhost:7001/baseinfo/getxmldata">http://localhost:7001/baseinfo/getxmldata" / map:transform src=""/ map:serialize type="fo2pdf" / /map:match
getxmldata if for calling the servlet which produce the needed xml stream.
how can I ignore the http://localhost:7001. is there any key to replace it and make it portable and flexible.

thanks alot for your attention.
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.

Re: Entity declaration

2004-03-08 Thread beyaNet Consultancy
Hi,
could you show me an example of how to do this please.
many thanks in advance
On 8 Mar 2004, at 12:14, David Leangen wrote:
Hi!

One way, and perhaps the easiest, is to declare your entities 
somewhere in
your DTD.

Hope this helps.

Dave






-Original Message-
From: beyaNet Consultancy [mailto:[EMAIL PROTECTED]
Sent: March 8, 2004 20:57
To: [EMAIL PROTECTED]
Subject: Entity declaration
Hi,
I have an entity in my page, nbsp;, which when passed through cocoon
throws an error. How do you handle entities in cocoon?
many thanks in advance

-
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: Entity declaration

2004-03-08 Thread robby . pelssers
If you want to use a space character, try #160;

-Original Message-
From: beyaNet Consultancy [mailto:[EMAIL PROTECTED]
Sent: 08mm2004 14:41
To: [EMAIL PROTECTED]
Subject: Re: Entity declaration


Hi,
could you show me an example of how to do this please.

many thanks in advance
On 8 Mar 2004, at 12:14, David Leangen wrote:


 Hi!

 One way, and perhaps the easiest, is to declare your entities 
 somewhere in
 your DTD.


 Hope this helps.

 Dave






 -Original Message-
 From: beyaNet Consultancy [mailto:[EMAIL PROTECTED]
 Sent: March 8, 2004 20:57
 To: [EMAIL PROTECTED]
 Subject: Entity declaration


 Hi,
 I have an entity in my page, nbsp;, which when passed through cocoon
 throws an error. How do you handle entities in cocoon?

 many thanks in advance


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



Portal Authentication Problem

2004-03-08 Thread Lenandlar Singh
Hello,

Im using cocoon 2.0.4 inside tomcat. I downloaded the binary.

The problem im having is when i try to view the Portal that comes with it at http://127.0.0.1:8080/cocoon/sunspotdemoportalits not there.

There is a notice saying "A customizable Portal with Cocoon. In order to run this sample, you have to build the Cocoon webapp with the "-Dinclude.scratchpad.libs" option. " 

Can someone tell me what i can do to get this to work.

Thanks.

Len.
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.

Re: Entity declaration

2004-03-08 Thread beyaNet Consultancy
Robert,
for the short term your last reply is sufficient, but for the long term 
it would be best if i declare it in an entity tag within my dtd.

many thanks

Andrew
On 8 Mar 2004, at 13:48, [EMAIL PROTECTED] wrote:
If you want to use a space character, try #160;

-Original Message-
From: beyaNet Consultancy [mailto:[EMAIL PROTECTED]
Sent: 08mm2004 14:41
To: [EMAIL PROTECTED]
Subject: Re: Entity declaration
Hi,
could you show me an example of how to do this please.
many thanks in advance
On 8 Mar 2004, at 12:14, David Leangen wrote:
Hi!

One way, and perhaps the easiest, is to declare your entities
somewhere in
your DTD.
Hope this helps.

Dave






-Original Message-
From: beyaNet Consultancy [mailto:[EMAIL PROTECTED]
Sent: March 8, 2004 20:57
To: [EMAIL PROTECTED]
Subject: Entity declaration
Hi,
I have an entity in my page, nbsp;, which when passed through cocoon
throws an error. How do you handle entities in cocoon?
many thanks in advance

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


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


Re: about axis examples

2004-03-08 Thread Johnson



Hi

When I use apache Httpd + SSL and jk2,it's ok.

Can anyone tell me how to define a cutom's service by 
cocoon axis,
how to write the cocoon client soap codeif the service 
is ssl(in batch mode for B2B usage).

Best Regards

Johnson

  - Original Message - 
  From: 
  Johnson 
  
  To: [EMAIL PROTECTED] 
  Sent: Sunday, March 07, 2004 9:21 PM
  Subject: about axis examples
  
  Hi!
  
  I'm trying to test the axis example,it's ok by http,but when 
  I use SSL of tomcat,and turn off 8080,nothing return.
  how to solve this problem
  
  Best Regards
  
  Johnson


Problems Loading Generator Component

2004-03-08 Thread Joel Sookram
Hello everyone,

 I' m currently working on a school project in which I'm trying to develop a
web site with news portals. I had modified the class ConfigurationGenerator
and called it 'Registration' to  allow users to register themselves before
logging in to the portal web site. After I had compile the modified class, I
had added it to  'cocoon-authentication-fw-block.jar' in  WEB-INF/lib
directory. The main sitemap was updated as  'map:generator label=content
name=reg-conf
src=org.apache.cocoon.webapps.authentication.generation.Registration/'
under the components section. When I fired up the cocoon servlet I got the
following message:

Internal Server Error
Message: null

Description: No details available.

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Request URI

FCB1.2/

cause

org.apache.cocoon.webapps.authentication.generation.Registration

request-uri

/FCB1.2/

Apache Cocoon 2.1rc1



Attached is the error log. I have tried many approaches to solve this
problem but nothing seems to work. Could someone give me some hints as to
what I am doing wrong? I am fairly new to Cocoon and I am currently using
Cocoon 2.1.3.


Thanks,
Joel



--
The information contained in this e-mail transmission is confidential and may be 
privileged. If you are not the intended recipient you are hereby notified that any 
use, dissemination or reproduction of this transmission (including any attachments) is 
strictly prohibited. If you have received this e-mail in error, please notify the 
sender immediately by e-mail reply and then delete it from your system.
--
ERROR   (2004-03-07) 15:31.23:009   [sitemap] (/FCB1.2/) 
PoolThread-4/ExtendedComponentSelector: Could not load class 
org.apache.cocoon.webapps.authentication.generation.Registration for component named 
'reg-conf' at file:/C:/cocoon-2.1rc1/build/webapp/sitemap.xmap:62:123
java.lang.ClassNotFoundException: 
org.apache.cocoon.webapps.authentication.generation.Registration
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:234)
at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:198)
at 
org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:268)
at 
org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector.configure(ComponentsSelector.java:192)
at 
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:239)
at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:315)
at 
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:141)
at 
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:554)
at 
org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:530)
at 
org.apache.cocoon.components.LifecycleHelper.setupComponent(LifecycleHelper.java:337)
at 
org.apache.cocoon.components.LifecycleHelper.setupComponent(LifecycleHelper.java:266)
at 
org.apache.cocoon.components.LifecycleHelper.setupComponent(LifecycleHelper.java:219)
at 
org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.createComponentManager(SitemapLanguage.java:104)
at 
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:411)
at 
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:391)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(TreeProcessor.java:439)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:321)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:309)
at org.apache.cocoon.Cocoon.process(Cocoon.java:621)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1088)
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 

Re: Entity declaration

2004-03-08 Thread beyaNet Consultancy
All is fine now. I am using the Catalog DTD.

many thanks in advance

On 8 Mar 2004, at 13:52, beyaNet Consultancy wrote:

Robert,
for the short term your last reply is sufficient, but for the long  
term it would be best if i declare it in an entity tag within my dtd.

many thanks

Andrew
On 8 Mar 2004, at 13:48, [EMAIL PROTECTED] wrote:
If you want to use a space character, try #160;

-Original Message-
From: beyaNet Consultancy [mailto:[EMAIL PROTECTED]
Sent: 08mm2004 14:41
To: [EMAIL PROTECTED]
Subject: Re: Entity declaration
Hi,
could you show me an example of how to do this please.
many thanks in advance
On 8 Mar 2004, at 12:14, David Leangen wrote:
Hi!

One way, and perhaps the easiest, is to declare your entities
somewhere in
your DTD.
Hope this helps.

Dave






-Original Message-
From: beyaNet Consultancy [mailto:[EMAIL PROTECTED]
Sent: March 8, 2004 20:57
To: [EMAIL PROTECTED]
Subject: Entity declaration
Hi,
I have an entity in my page, nbsp;, which when passed through  
cocoon
throws an error. How do you handle entities in cocoon?

many thanks in advance

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


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


AW: Problems Loading Generator Component

2004-03-08 Thread Hildebrandt, Ole
Hi,

From the stacktrace I would say that Cocoon was unable to load your
Registration-Class. (NoClassDefFound)
Make sure, that you have deployed it properly. Have you restarted TomCat?

Ole

 -Ursprüngliche Nachricht-
 Von: Joel Sookram [mailto:[EMAIL PROTECTED] 
 Gesendet: Montag, 8. März 2004 15:03
 An: [EMAIL PROTECTED]
 Betreff: Problems Loading Generator Component
 
 
 Hello everyone,
 
  I' m currently working on a school project in which I'm 
 trying to develop a web site with news portals. I had 
 modified the class ConfigurationGenerator and called it 
 'Registration' to  allow users to register themselves before 
 logging in to the portal web site. After I had compile the 
 modified class, I had added it to  
 'cocoon-authentication-fw-block.jar' in  WEB-INF/lib 
 directory. The main sitemap was updated as  'map:generator 
 label=content name=reg-conf 
 src=org.apache.cocoon.webapps.authentication.generation.Regis
 tration/'
 under the components section. When I fired up the cocoon 
 servlet I got the following message:
 
 Internal Server Error
 Message: null
 
 Description: No details available.
 
 Sender: org.apache.cocoon.servlet.CocoonServlet
 
 Source: Cocoon Servlet
 
 Request URI
 
 FCB1.2/
 
 cause
 
 org.apache.cocoon.webapps.authentication.generation.Registration
 
 request-uri
 
 /FCB1.2/
 
 Apache Cocoon 2.1rc1
 
 
 
 Attached is the error log. I have tried many approaches to 
 solve this problem but nothing seems to work. Could someone 
 give me some hints as to what I am doing wrong? I am fairly 
 new to Cocoon and I am currently using Cocoon 2.1.3.
 
 
 Thanks,
 Joel
 
 
 
 --
 The information contained in this e-mail transmission is 
 confidential and may be privileged. If you are not the 
 intended recipient you are hereby notified that any use, 
 dissemination or reproduction of this transmission (including 
 any attachments) is strictly prohibited. If you have received 
 this e-mail in error, please notify the sender immediately by 
 e-mail reply and then delete it from your system.
 --
 

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



Re: Need help on generating excel

2004-03-08 Thread Anna Bikkina
This produces a html which is not formatted.

Thanks for the reply
Anna.


On Friday 05 March 2004 11:21 pm, Tim Larson wrote:
 On Fri, Mar 05, 2004 at 04:47:24PM -0500, Anna Bikkina wrote:
 snip/

  I have another button which converts the same data to excel . It performs
  query to the database and is expected to display data in excel. I am
  using the org.apache.cocoon.serialization.HSSFSerializer to perform this.
 
   map:generate src=security.xsp type=serverpages label=raw/
  map:transform src=context:/historyserver/styles/page2xls.xsl/
  map:serialize type=xls/

 So what does this produce?  An exception, a file in some other format,
 a malformed excel file, or what?

  The first one works but the second one does not create a excel file.
  When I view the xml that is  generated using views(with label raw) and
  copy the content to a xml file and use that as input to transform and
  then serialize to xls that works. It displays the output in excel.

 --Tim Larson

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



Packages naming best practises

2004-03-08 Thread Oscar Picasso
Hi,

I am writing a Cocoon application.

I would like to avoid renaming my packages in case there are useful for the
cocoon community.

Let's say I have the following classes:

// Sitemap components
- com.mycompany.cocoon.generation.CacheableVelocityGenerator
- com.mycompany.cocoon.action.DefaultPathAction

// An avalon component (but not a sitemap one)
- com.mycompany.cocoon.components.DefaultPathProvider

1- Is it recommended or discouraged to use 'org.apache.cocoon... instead of
'com.mycompany.cocoon...' if I make the code publicly available?

2- In case the 'org.apache.cocoon' naming is recommended and supposing my
classes are aimed at easing the creation of web sites.

Is it better to name them like this:
- org.apache.cocoon.generation.CacheableVelocityGenerator
- org.apache.cocoon.action.DefaultPathAction

or something like that:
- org.apache.cocoon.sitebuilder.generation.CacheableVelocityGenerator
- org.apache.cocoon.sitebuilder.action.DefaultPathAction

Thanks.



__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



cocoon vs forrest

2004-03-08 Thread Albert Shih
Hi


Stupid question from a real newbie.

What difference between cocoon and forrest ?

I've see forrest is implemented over cocoon. 

If I start whit forrest (It's documentation project), after I've some date
and when I see forrest isn't powerfull can'i switch to cocoon (and do not
rewrite all data) ?

Regards.


--
Albert SHIH
Universite de Paris 7 (Denis DIDEROT)
U.F.R. de Mathematiques.
Heure local/Local time:
Mon Mar 8 16:40:22 CET 2004

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



Installing Cocoon On debian

2004-03-08 Thread Laurent BERTHELOT



Hello,

(sorry for my poor english...)

I wanna install cocoon (v2.0.4) on debian 
(woody)

I use :
- JDK 1.4.3 (src)
- Tomcat 3.3a final (pkg)

I use src files (build is OK), I restart tomcat (Ok), but i have a problem when i launch Cocoon 
on http://myserver:myport/cocoon/

I have this error :

//

type 
fatal
message 
Error in sitemap configuration : UnnamedSelector: ComponentSelector could not 
find the component for hint []
description 
org.apache.avalon.framework.configuration.ConfigurationException: Error in 
sitemap configuration : UnnamedSelector: ComponentSelector could not find the 
component for hint []
sender 
org.apache.cocoon.servlet.CocoonServlet
source 
Cocoon servlet
stack-traceorg.apache.avalon.framework.configuration.ConfigurationException: Error in sitemap configuration : UnnamedSelector: ComponentSelector could not find the component for hint []
	at org.apache.cocoon.www.sitemap_xmap.configure(/var/cache/tomcat/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:405)
	at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:264)
	at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:98)
	at org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:187)
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:357)
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:312)
	at org.apache.cocoon.sitemap.Handler.run(Handler.java:267)
	at java.lang.Thread.run(Thread.java:534)
Caused by: org.apache.avalon.framework.component.ComponentException: UnnamedSelector: ComponentSelector could not find the component for hint []
	at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(ExcaliburComponentSelector.java:198)
	at org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.select(DefaultSitemapComponentSelector.java:101)
	at org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.select(DefaultSitemapComponentSelector.java:104)
	at org.apache.cocoon.www.sitemap_xmap.preparePattern(/var/cache/tomcat/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:1554)
	at org.apache.cocoon.www.sitemap_xmap.prepareMatchers(/var/cache/tomcat/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:1573)
	at org.apache.cocoon.www.sitemap_xmap.configure(/var/cache/tomcat/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:398)
	... 7 more


request-uri/cocoon/

path-info
//

I have the same problem when i use the cocoon2 
debian package...
It-is a problem of jar's files loading order 
?
mayi change the server.xml configuration file 
of Tomcat ?i think not...

I'm sure there's a thread on this mailing list with 
the answer but i don't found it !
Thank you for you help.

Laurent 
laurent dot berthelot at studioblanc dot 
fr


Re: Packages naming best practises

2004-03-08 Thread Geoff Howard
Oscar Picasso wrote:

Hi,

I am writing a Cocoon application.

I would like to avoid renaming my packages in case there are useful for the
cocoon community.
Let's say I have the following classes:

// Sitemap components
- com.mycompany.cocoon.generation.CacheableVelocityGenerator
- com.mycompany.cocoon.action.DefaultPathAction
// An avalon component (but not a sitemap one)
- com.mycompany.cocoon.components.DefaultPathProvider
1- Is it recommended or discouraged to use 'org.apache.cocoon... instead of
'com.mycompany.cocoon...' if I make the code publicly available?
2- In case the 'org.apache.cocoon' naming is recommended and supposing my
classes are aimed at easing the creation of web sites.
Is it better to name them like this:
- org.apache.cocoon.generation.CacheableVelocityGenerator
- org.apache.cocoon.action.DefaultPathAction
or something like that:
- org.apache.cocoon.sitebuilder.generation.CacheableVelocityGenerator
- org.apache.cocoon.sitebuilder.action.DefaultPathAction
This boils down to a licensing question.  As I understand it, you cannot 
use org.apache.cocoon package name unless your code is donated to Cocoon.

Geoff

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


Re: Packages naming best practises

2004-03-08 Thread Oscar Picasso
Hi,

I have no problem to donate the code to Cocoon. 

Just want to know if the code needs to get some kind of approval before using
the 'org.apache.cocoon' name.

Oscar

--- Geoff Howard [EMAIL PROTECTED] wrote:
 Oscar Picasso wrote:
 
  Hi,
  
  I am writing a Cocoon application.
  
  I would like to avoid renaming my packages in case there are useful for the
  cocoon community.
  
  Let's say I have the following classes:
  
  // Sitemap components
  - com.mycompany.cocoon.generation.CacheableVelocityGenerator
  - com.mycompany.cocoon.action.DefaultPathAction
  
  // An avalon component (but not a sitemap one)
  - com.mycompany.cocoon.components.DefaultPathProvider
  
  1- Is it recommended or discouraged to use 'org.apache.cocoon... instead
 of
  'com.mycompany.cocoon...' if I make the code publicly available?
  
  2- In case the 'org.apache.cocoon' naming is recommended and supposing my
  classes are aimed at easing the creation of web sites.
  
  Is it better to name them like this:
  - org.apache.cocoon.generation.CacheableVelocityGenerator
  - org.apache.cocoon.action.DefaultPathAction
  
  or something like that:
  - org.apache.cocoon.sitebuilder.generation.CacheableVelocityGenerator
  - org.apache.cocoon.sitebuilder.action.DefaultPathAction
 
 This boils down to a licensing question.  As I understand it, you cannot 
 use org.apache.cocoon package name unless your code is donated to Cocoon.
 
 Geoff
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



Re: Installing Cocoon On debian

2004-03-08 Thread Lionel Crine
I advise you to use cocoon 2.1.4 and tomcat 4.x on debian.

deb packages are not available on the woody, so get the source and compile 
them.
If I remembered correctly : you only have to set the environment variables 
(for tomcat, cocoon and the jdk) and launch the build script.

About you error : look at the tomcat and cocoon logs. You may not have the 
newest xerces and xalan jars.

Lionel







At 16:58 08/03/2004 +0100, you wrote:
Hello,

(sorry for my poor english...)

I wanna install cocoon (v2.0.4) on debian (woody)

I use :
- JDK 1.4.3 (src)
- Tomcat 3.3a final (pkg)
I use src files (build is OK), I restart tomcat (Ok), but i have a problem 
when i launch Cocoon on 
http://myserver:myport/cocoon/http://myserver:myport/cocoon/

I have this error :

//

type fatal

message Error in sitemap configuration : UnnamedSelector: 
ComponentSelector could not find the component for hint []

description 
org.apache.avalon.framework.configuration.ConfigurationException: Error in 
sitemap configuration : UnnamedSelector: ComponentSelector could not find 
the component for hint []

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

stack-trace
org.apache.avalon.framework.configuration.ConfigurationException: Error in 
sitemap configuration : UnnamedSelector: ComponentSelector could not find 
the component for hint []
at 
org.apache.cocoon.www.sitemap_xmap.configure(/var/cache/tomcat/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:405)
at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:264)
at 
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:98)
at 
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:187)
at 
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:357)
at 
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:312)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:267)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.apache.avalon.framework.component.ComponentException: 
UnnamedSelector: ComponentSelector could not find the component for hint []
at 
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(ExcaliburComponentSelector.java:198)
at 
org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.select(DefaultSitemapComponentSelector.java:101)
at 
org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.select(DefaultSitemapComponentSelector.java:104)
at 
org.apache.cocoon.www.sitemap_xmap.preparePattern(/var/cache/tomcat/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:1554)
at 
org.apache.cocoon.www.sitemap_xmap.prepareMatchers(/var/cache/tomcat/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:1573)
at 
org.apache.cocoon.www.sitemap_xmap.configure(/var/cache/tomcat/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:398)
... 7 more
request-uri
/cocoon/
path-info
//

I have the same problem when i use the cocoon2 debian package...
It-is a problem of jar's files loading order ?
may i change the server.xml configuration file of Tomcat ? i think not...
I'm sure there's a thread on this mailing list with the answer but i don't 
found it !
Thank you for you help.

Laurent
laurent dot berthelot at studioblanc dot fr
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]


ServiceManager questions

2004-03-08 Thread Oscar Picasso
Hi,

On the wikki I have read that cocoon uses an Excalibur Component Manager at the
top level and child Excalibur Component Managers at each sitemap level.

1- Does this mean that when using a Serviceable sitemap component, the
ServiceManager provided by cocoon to the service method is a
'WrapperServiceManager' ?

2-Am I correct to suppose that the ServiceManager provided to a Serviceable
sitemap component is the sitemap level (Wrapper)ServiceManager and not the top
level one.

Oscar

__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



Re: using URL in map:match

2004-03-08 Thread Jeroen Reijn
Hmm something went wrong with my mail client.

It should be like this:

map:match pattern=*.pdf
map:generate src=cocoon:/baseinfo/getxmldata /
map:transform src=format/style/xsl/doc2pdf.xsl/
map:serialize type=fo2pdf /
/map:match
without the link.

Hi,

you could use the internal cocoon protocol:

like

map:match pattern=*.pdf
map:generate src= 
http://localhost:7001/baseinfo/getxmldatacocoon:/baseinfo/getxmldata 
/
map:transform src=format/style/xsl/doc2pdf.xsl/
map:serialize type=fo2pdf /
/map:match

in wich case the baseinfo/getxmldata is another matcher.

Greetz,

Jeroen

reza x schreef:

hi all
I want use sitemap to get the output stream from a servlet.
my sitemap.xml snippest now is like this:
map:match pattern=*.pdf
map:generate src=http://localhost:7001/baseinfo/getxmldata; /
map:transform src=format/style/xsl/doc2pdf.xsl/
map:serialize type=fo2pdf /
/map:match
getxmldata if for calling the servlet which produce the needed xml 
stream.
how can I ignore the http://localhost:7001. is there any key to 
replace it and make it portable and flexible.
thanks alot for your attention.

Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster. 
http://search.yahoo.com/?fr=ad-mailsig-home 




-
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: Problems Loading Generator Component

2004-03-08 Thread Joel Sookram
Thanks for your response.

I'm using the Jetty server provided with Cocoon 2.1.3. I did restart the
server several times but I keep getting the same error. I know this could be
a deployment problem but it is quite stubborn. Is there a location besides
the 'build\webapp\WEB-INF\lib\'directory for deploying new or customized
classes?

Thanks,
Joel

-Original Message-
From: Hildebrandt, Ole [mailto:[EMAIL PROTECTED]
Sent: Monday, March 08, 2004 10:16 AM
To: [EMAIL PROTECTED]
Subject: AW: Problems Loading Generator Component


Hi,

From the stacktrace I would say that Cocoon was unable to load your
Registration-Class. (NoClassDefFound)
Make sure, that you have deployed it properly. Have you restarted TomCat?

Ole

 -Ursprüngliche Nachricht-
 Von: Joel Sookram [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 8. März 2004 15:03
 An: [EMAIL PROTECTED]
 Betreff: Problems Loading Generator Component


 Hello everyone,

  I' m currently working on a school project in which I'm
 trying to develop a web site with news portals. I had
 modified the class ConfigurationGenerator and called it
 'Registration' to  allow users to register themselves before
 logging in to the portal web site. After I had compile the
 modified class, I had added it to
 'cocoon-authentication-fw-block.jar' in  WEB-INF/lib
 directory. The main sitemap was updated as  'map:generator
 label=content name=reg-conf
 src=org.apache.cocoon.webapps.authentication.generation.Regis
 tration/'
 under the components section. When I fired up the cocoon
 servlet I got the following message:

 Internal Server Error
 Message: null

 Description: No details available.

 Sender: org.apache.cocoon.servlet.CocoonServlet

 Source: Cocoon Servlet

 Request URI

 FCB1.2/

 cause

 org.apache.cocoon.webapps.authentication.generation.Registration

 request-uri

 /FCB1.2/

 Apache Cocoon 2.1rc1



 Attached is the error log. I have tried many approaches to
 solve this problem but nothing seems to work. Could someone
 give me some hints as to what I am doing wrong? I am fairly
 new to Cocoon and I am currently using Cocoon 2.1.3.


 Thanks,
 Joel



 --
 The information contained in this e-mail transmission is
 confidential and may be privileged. If you are not the
 intended recipient you are hereby notified that any use,
 dissemination or reproduction of this transmission (including
 any attachments) is strictly prohibited. If you have received
 this e-mail in error, please notify the sender immediately by
 e-mail reply and then delete it from your system.
 --


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

--
The information contained in this e-mail transmission is confidential and may be 
privileged. If you are not the intended recipient you are hereby notified that any 
use, dissemination or reproduction of this transmission (including any attachments) is 
strictly prohibited. If you have received this e-mail in error, please notify the 
sender immediately by e-mail reply and then delete it from your system.
--



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



Re: using URL in map:match

2004-03-08 Thread Jeroen Reijn
Hi,

you could use the internal cocoon protocol:

like

map:match pattern=*.pdf
map:generate src= 
http://localhost:7001/baseinfo/getxmldatacocoon:/baseinfo/getxmldata /
map:transform src=format/style/xsl/doc2pdf.xsl/
map:serialize type=fo2pdf /
/map:match

in wich case the baseinfo/getxmldata is another matcher.

Greetz,

Jeroen

reza x schreef:

hi all
I want use sitemap to get the output stream from a servlet.
my sitemap.xml snippest now is like this:
map:match pattern=*.pdf
map:generate src=http://localhost:7001/baseinfo/getxmldata; /
map:transform src=format/style/xsl/doc2pdf.xsl/
map:serialize type=fo2pdf /
/map:match
getxmldata if for calling the servlet which produce the needed xml stream.
how can I ignore the http://localhost:7001. is there any key to 
replace it and make it portable and flexible.
thanks alot for your attention.

Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster. 
http://search.yahoo.com/?fr=ad-mailsig-home 


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


Basic authentification with Soap

2004-03-08 Thread Hauke Ernst
Hello,

In SoapHelper I saw some handling for basic authorization when invoking
a password restricted soap web service. Does anyone know where is gets
the username and passwd from? Is it taken from the session context /
portal engine authentification or can I set these infos in my xsp page?

Please help!

Best regards, Hauke
___
Hauke Ernst
Bendit GmbH
Innovative Interfaces
Fahrenheitstr. 1
D-28359 Bremen
mobil +49 (174) 3224679
fon +49 (421) 2208408
fax +49 (421) 2208407
email [EMAIL PROTECTED]
___


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



Re: xsp upload nightmare

2004-03-08 Thread gounis

hi marcius

can i add your modification in a new wiki page ?

can you describe what else is this code make ?


--stavros


On Sat, 6 Mar 2004, Z.Z. wrote:

 Hello All,
 2004. mrcius 4. 14.47 dtummal [EMAIL PROTECTED] ezt rta:
  take a look here
 
  http://wiki.cocoondev.org/Wiki.jsp?page=RecipeUploadUsingAction
 
  it working
 
 Thanks a lot, it working really.
 
 I use it in Linux and my context is my home directory, link is: 
 server/cocoon/~zamek/app/
 
 I cannot pass it to Fileupload. I think I try to pass cocoon:/ but it doesn
 t works. 
 
 I modified your code to accept cocoon:/ protocoll:
 
 declarations section:
 
/* cocoon:/ */
private static final String COCOON_ENTRY = cocoon:/;
private final static String FILE_ENTRY = file:;
 
 and act method:
 
 originally:
   if (req instanceof HttpRequest) {
 
   HttpRequest request = (HttpRequest) req;
 
   /* create necessary directory structure  */
   File uplDir = new File(parUploadDirectory);
   if (isDebugEnabled) {
   myLogger.debug(
   upload directory is:  + 
 uplDir.getAbsolutePath());
   }
 
   if (uplDir.isAbsolute() == false) {
   // check for first relative slash
   if (parUploadDirectory.indexOf('/') != 0) {
   parUploadDirectory = / + parUploadDirectory;
   }
   
   uplDir = new 
 File(context.getRealPath(parUploadDirectory));
   }   
 
   if (isDebugEnabled) {
   myLogger.debug(
   absolute upload directory is: 
   + uplDir.getAbsolutePath());
   }
 
 modified:
   if (req instanceof HttpRequest) {
 
   HttpRequest request = (HttpRequest) req;
 
   /* create necessary directory structure  */
   File uplDir = new File(parUploadDirectory);
   if (isDebugEnabled) {
   myLogger.debug(
   upload directory is:  + 
 uplDir.getAbsolutePath());
   }
 
   if (parUploadDirectory.startsWith(COCOON_ENTRY) ) {
   parUploadDirectory = 
 parUploadDirectory.substring(COCOON_ENTRY.length());
   Source inputSource = resolver.resolveURI();
   String sysId = inputSource.getURI();
   sysId = sysId.substring(new 
 String(FILE_ENTRY).length());
   uplDir = new File (sysId+parUploadDirectory);
   }
 else {
 
   if (uplDir.isAbsolute() == false) {
   // check for first relative slash
   if (parUploadDirectory.indexOf('/') != 0) {
   parUploadDirectory = / + 
 parUploadDirectory;
   }
   
   uplDir = new 
 File(context.getRealPath(parUploadDirectory));
   }   
   }
 
   if (isDebugEnabled) {
   myLogger.debug(
   absolute upload directory is: 
   + uplDir.getAbsolutePath());
   }
 
 
 and need to import 
 import org.apache.excalibur.source.Source;
 
 in sitemap you can use:
 
   map:match pattern=upload-*
 map:act type=file-upload-action
 map:parameter name=number-of-files value=1/
 map:parameter name=file-form-field-prefix 
 value=upload-file/
 map:parameter name=upload-directory 
 value=cocoon:/{request-param:upload-dir}/
 map:parameter name=overwrite-file value=rename/
 
 
 


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



DTD declaration in html page...

2004-03-08 Thread beyaNet Consultancy
Hi,
when viewing the source of my html pages they have an HTML 4 DTD:

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhttp://www.w3.org/TR/html4/loose.dtd>

I want my page to render with an XHTML DTD being specified at the top of the page when I view the source:

!DOCTYPE html 
PUBLIC -//W3C//DTD XHTML 1.0 Transitional/EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>

How dod I do this?

many thanks in advance

AW: Problems Loading Generator Component

2004-03-08 Thread Hildebrandt, Ole
Hi

I am also new to cocoon, but I think your problem only regards classloading
in TomCat. So here is my suggestion.

Maybe it is a good idea to create yor own personal Jar-File containing all
the Application-specific Classes you implemented. Use your own package
structure like org.myorganization.myproject as this is better to distinguish
between (Core)Cocoon Classes and your own application classes. (Of course
you have to change the src attribute to 
org.myorganization.myproject.Registration in the sitemap)
Then you compile all your application classes into a single jar file an put
it under build\webapp\WEB-INF\lib

Usually this should work. Consider using a eclipse (if your are not already)
as eclipse has a good export-functionality for creating jar-files.

Regards

Ole

 -Ursprüngliche Nachricht-
 Von: Joel Sookram [mailto:[EMAIL PROTECTED] 
 Gesendet: Montag, 8. März 2004 17:32
 An: [EMAIL PROTECTED]
 Betreff: RE: Problems Loading Generator Component
 
 
 Thanks for your response.
 
 I'm using the Jetty server provided with Cocoon 2.1.3. I did 
 restart the server several times but I keep getting the same 
 error. I know this could be a deployment problem but it is 
 quite stubborn. Is there a location besides the 
 'build\webapp\WEB-INF\lib\'directory for deploying new or 
 customized classes?
 
 Thanks,
 Joel
 
 -Original Message-
 From: Hildebrandt, Ole [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 08, 2004 10:16 AM
 To: [EMAIL PROTECTED]
 Subject: AW: Problems Loading Generator Component
 
 
 Hi,
 
 From the stacktrace I would say that Cocoon was unable to 
 load your Registration-Class. (NoClassDefFound) Make sure, 
 that you have deployed it properly. Have you restarted TomCat?
 
 Ole
 
  -Ursprüngliche Nachricht-
  Von: Joel Sookram [mailto:[EMAIL PROTECTED]
  Gesendet: Montag, 8. März 2004 15:03
  An: [EMAIL PROTECTED]
  Betreff: Problems Loading Generator Component
 
 
  Hello everyone,
 
   I' m currently working on a school project in which I'm trying to 
  develop a web site with news portals. I had modified the class 
  ConfigurationGenerator and called it 'Registration' to  
 allow users to 
  register themselves before logging in to the portal web 
 site. After I 
  had compile the modified class, I had added it to
  'cocoon-authentication-fw-block.jar' in  WEB-INF/lib
  directory. The main sitemap was updated as  'map:generator
  label=content name=reg-conf
  src=org.apache.cocoon.webapps.authentication.generation.Regis
  tration/'
  under the components section. When I fired up the cocoon
  servlet I got the following message:
 
  Internal Server Error
  Message: null
 
  Description: No details available.
 
  Sender: org.apache.cocoon.servlet.CocoonServlet
 
  Source: Cocoon Servlet
 
  Request URI
 
  FCB1.2/
 
  cause
 
  org.apache.cocoon.webapps.authentication.generation.Registration
 
  request-uri
 
  /FCB1.2/
 
  Apache Cocoon 2.1rc1
 
 
 
  Attached is the error log. I have tried many approaches to 
 solve this 
  problem but nothing seems to work. Could someone give me 
 some hints as 
  to what I am doing wrong? I am fairly new to Cocoon and I 
 am currently 
  using Cocoon 2.1.3.
 
 
  Thanks,
  Joel
 
 
 
  --
  The information contained in this e-mail transmission is 
 confidential 
  and may be privileged. If you are not the intended 
 recipient you are 
  hereby notified that any use, dissemination or reproduction of this 
  transmission (including any attachments) is strictly prohibited. If 
  you have received this e-mail in error, please notify the sender 
  immediately by e-mail reply and then delete it from your system.
  --
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 --
 The information contained in this e-mail transmission is 
 confidential and may be privileged. If you are not the 
 intended recipient you are hereby notified that any use, 
 dissemination or reproduction of this transmission (including 
 any attachments) is strictly prohibited. If you have received 
 this e-mail in error, please notify the sender immediately by 
 e-mail reply and then delete it from your system.
 --
 
 
 
 -
 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: DTD declaration in html page...

2004-03-08 Thread beyaNet Consultancy
ok,
I found it. I will supersede the definition in the root sitemap.xmap:

map:serializer logger=sitemap.serializer.html mime-type=text/html name=html pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer>

doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN/doctype-public>

/doctype-system>
/map:serializer>

with my own definition in my application sitemap.xmap:

map:serializer logger=sitemap.serializer.html mime-type=text/html name=html pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer>

-//W3C//DTD XHTML 1.0 Transitional/EN/doctype-public>

/doctype-system>
/map:serializer>

If this is incorrect please advise.

many thanks in return
On 8 Mar 2004, at 16:54, beyaNet Consultancy wrote:

Hi,
when viewing the source of my html pages they have an HTML 4 DTD:

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhttp://www.w3.org/TR/html4/loose.dtd>

I want my page to render with an XHTML DTD being specified at the top of the page when I view the source:

!DOCTYPE html 
PUBLIC -//W3C//DTD XHTML 1.0 Transitional/EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>

How dod I do this?

many thanks in advance

Re: Problems Loading Generator Component

2004-03-08 Thread Geoff Howard
Joel Sookram wrote:

Thanks for your response.

I'm using the Jetty server provided with Cocoon 2.1.3. I did restart the
server several times but I keep getting the same error. I know this could be
a deployment problem but it is quite stubborn. Is there a location besides
the 'build\webapp\WEB-INF\lib\'directory for deploying new or customized
classes?


That's going to be irrelevant.  Deploying new classes is trivial and 
should work right off.  I'd bet dollars to doughnuts you either put the 
new class into the jar incorrectly (jar tvf should turn that up) or you 
have a typo in a config file somewhere.

Geoff


-Original Message-
From: Hildebrandt, Ole [mailto:[EMAIL PROTECTED]
Sent: Monday, March 08, 2004 10:16 AM
To: [EMAIL PROTECTED]
Subject: AW: Problems Loading Generator Component
Hi,

From the stacktrace I would say that Cocoon was unable to load your
Registration-Class. (NoClassDefFound)
Make sure, that you have deployed it properly. Have you restarted TomCat?
Ole


-Ursprüngliche Nachricht-
Von: Joel Sookram [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 8. März 2004 15:03
An: [EMAIL PROTECTED]
Betreff: Problems Loading Generator Component
Hello everyone,

I' m currently working on a school project in which I'm
trying to develop a web site with news portals. I had
modified the class ConfigurationGenerator and called it
'Registration' to  allow users to register themselves before
logging in to the portal web site. After I had compile the
modified class, I had added it to
'cocoon-authentication-fw-block.jar' in  WEB-INF/lib
directory. The main sitemap was updated as  'map:generator
label=content name=reg-conf
src=org.apache.cocoon.webapps.authentication.generation.Regis
tration/'
under the components section. When I fired up the cocoon
servlet I got the following message:
Internal Server Error
Message: null
Description: No details available.

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Request URI

FCB1.2/

cause

org.apache.cocoon.webapps.authentication.generation.Registration

request-uri

/FCB1.2/

Apache Cocoon 2.1rc1



Attached is the error log. I have tried many approaches to
solve this problem but nothing seems to work. Could someone
give me some hints as to what I am doing wrong? I am fairly
new to Cocoon and I am currently using Cocoon 2.1.3.
Thanks,
Joel




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


Generic component and cocoon

2004-03-08 Thread Oscar Picasso
Hi,

Is it possible to write generic components but make them available only to the
sitemap container for reuse by sitemap components?

Let's give an example.

I have a DefaultPathProvider with a provide(String partialPath) methods that
returns a complete default path from a partial path.

It is configured with an xml file like this one:

path-step name=book default=geography

  path-step name=history default=middle-age
...
  /path-step

  path-step name=geography default=europe
path-step name=america default=...
  ...
/path-step
path-step name=europe default=italy
  path-step name=germany/
  path-step name=france/
  path-step name=italy/
  path-step name=spain/
  ...
/path-step
...
  /path-step

/path-step


Once configured with the above xml file, the provide method would return the
following results.

provide(/book) -- /book/geography/europe/italy
provide(/book/geography) -- /book/geography/europe/italy
provide(/book/geography/europe) -- /book/geography/europe/italy

provide(/book/history) -- /book/history/middle-age/...

I would like this kind of component to be managed by the sitemap level service
manager, to make it available to the serviceable components of the same
sitemap?

Does it make sense? Are they some examples of code in the cocoon distribution
that use a similar approach?

Let me know if I am completly wrong on the way of developping generic component
and use them in cocoon.

Thanks.

Oscar

__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



Saxon 7 and system-property

2004-03-08 Thread Sal Mangano
All the info I can find about using saxon with cocoon indicates that you
merly need to replace the xalan jar with the saxon one. I did that.

However, I notice two problems:

1) My sitemap.log contains:

WARN(2004-03-08) 12:37.09:187   [sitemap.serializer.xml]
(/cocoon/abc/login) http8080-Processor4/AbstractTextSerializer: Cannot know
if transformer needs namespaces attributes - assuming NO.
org.xml.sax.SAXException: Saxon requires an XML parser that reports the
QName of each element
 at net.sf.saxon.event.ContentEmitter.getNameCode(ContentEmitter.java:171)
 at net.sf.saxon.event.ContentEmitter.startElement(ContentEmitter.java:129)
 at
org.apache.cocoon.serialization.AbstractTextSerializer.needsNamespacesAsAttr
ibutes(AbstractTextSerializer.java:355)
 at
org.apache.cocoon.serialization.AbstractTextSerializer.configure(AbstractTex
tSerializer.java:282)
 at
org.apache.cocoon.serialization.XMLSerializer.configure(XMLSerializer.java:7
6)
 at
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.
java:239)
 at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
faultComponentFactory.java:302)
 at
org.apache.avalon.excalibur.pool.ResourceLimitingPool.newPoolable(ResourceLi
mitingPool.java:672)
 at
org.apache.avalon.excalibur.pool.ResourceLimitingPool.get(ResourceLimitingPo
ol.java:402)
 at
org.apache.avalon.excalibur.component.PoolableComponentHandler.doGet(Poolabl
eComponentHandler.java:233)
 at
org.apache.avalon.excalibur.component.ComponentHandler.get(ComponentHandler.
java:410)
 at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(Exca
liburComponentSelector.java:246)
 at
org.apache.cocoon.components.ExtendedComponentSelector.select(ExtendedCompon
entSelector.java:296)
...

2) A test stylesheet 


?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:output method=xml/
xsl:template match=/* priority=10
xsltxsl:value-of select=system-property('xsl:vendor')/ xsl:value-of
select=system-property('xsl:version')/ xsl:value-of
select=system-property('xsl:vendor-url')/ /xslt
/xsl:template
/xsl:stylesheet


produces:

xsltApache Software Foundation1http://xml.apache.org/xalan-j/xslt 


Any suggestions or redirects to docs I missed would be appreciated.

-Sal Mangano


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



AW: ServiceManager questions

2004-03-08 Thread Marco Rolappe
hi oscar,

see inline comments...

 -Ursprungliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Oscar Picasso
 Gesendet: Montag, 8. Marz 2004 17:34
 An: cocoon list
 Betreff: ServiceManager questions


 Hi,

 On the wikki I have read that cocoon uses an Excalibur Component
 Manager at the
 top level and child Excalibur Component Managers at each sitemap level.

 1- Does this mean that when using a Serviceable sitemap component, the
 ServiceManager provided by cocoon to the service method is a
 'WrapperServiceManager' ?

yes, at least for cocoon = 2.1.x.  but that WrapperServicerManager proxy is
actually provided by the ECM (ExcaliburComponentManager) automagically. you
shouldn't assume anything other than a ServiceManager when your component is
service()d, though; ECM (and thus WrapperServiceManager) will be gone in
cocoon 2.2.

 2-Am I correct to suppose that the ServiceManager provided to a
 Serviceable
 sitemap component is the sitemap level (Wrapper)ServiceManager
 and not the top
 level one.

yes, every sitemap got its own ComponentManager/ServiceManager, which is
passed to sitemap components of the respective sitemap. I'm not sure,
though, which CM/SM you mean with the top level one; the root sitemap's or
cocoon's (which normally is the 'root' and the one configured via
cocoon.xconf)? the latter can even be passed a parent CM. anyways, don't
forget that the sitemap CM's form a hierarchy; each subsitemap's CM
delegates to its parent sitemap's CM.

hope that clarified it a bit.



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



2.1.4 loading xmap file with flow/jxform creates IndexOutOfBoundsException

2004-03-08 Thread Peter Lerche
Hi,

I have run into a problem that has shown its ugly face in version 2.1.4 dev 
and 2.1.4 release.

The first time (and only the first time) I access any jxform xhtml page I get 
below error. 

If I restart cocoon I get the errors again but only once per xhtml page.

Any idea's ? 


Peter Lerche



Internal Server Error

Message: Failed to load sitemap from 
file:/opt/projects/IdeaProjects/XMLdream3.2/jboss-3.2.3/server/default/deploy/cocoon.war/xdfs/mount_cp/cp.xmap


Description: org.apache.cocoon.ProcessingException: Failed to load sitemap 
from 
file:/opt/projects/IdeaProjects/XMLdream3.2/jboss-3.2.3/server/default/deploy/cocoon.war/xdfs/mount_cp/cp.xmap:
 
java.lang.IndexOutOfBoundsException: Index: 3, Size: 2


Sender: org.apache.cocoon.servlet.CocoonServlet


Source: Cocoon Servlet


Request URI

cp/personal/personal.html

cause

java.lang.IndexOutOfBoundsException: Index: 3, Size: 2

request-uri

/cp/personal/personal.html

full exception chain stacktrace

Original Exception: java.lang.IndexOutOfBoundsException: Index: 3, Size: 2
at java.util.ArrayList.RangeCheck(ArrayList.java:507)
at java.util.ArrayList.get(ArrayList.java:324)
at 
org.apache.cocoon.components.EnvironmentStack.getCurrent(EnvironmentStack.java:74)
at 
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentManager.java:309)
at 
org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.createComponentManager(SitemapLanguage.java:113)
at 
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:414)
at 
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:394)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(TreeProcessor.java:516)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:353)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312)
at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312)
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:354)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)
at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)
at org.mortbay.http.HttpServer.service(HttpServer.java:879)
at org.jboss.jetty.Jetty.service(Jetty.java:456)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
at 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:501)



stacktrace

org.apache.cocoon.ProcessingException: Failed to load sitemap from 
file:/opt/projects/IdeaProjects/XMLdream3.2/jboss-3.2.3/server/default/deploy/cocoon.war/xdfs/mount_cp/cp.xmap:
 
java.lang.IndexOutOfBoundsException: Index: 3, Size: 2
at 
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:398)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(TreeProcessor.java:516)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:353)
at 

[WOODY] - How to bind a repeater from other widget (or add filled in repeaters from another source )

2004-03-08 Thread JD Daniels
I am sure this can be done.. I am lost in the wiki :)

Could someone point me to the right miki page or tell me which woody 
keywords i should be looking under?

Say I have a select widget which is rendered :

select name=itemId
   option value=1First type of thing/option
   option value=2Second type of thing/option
   option value=3Third type of thing/option
/select
Now in my form template, I want assign an repeater add action to this 
select.

so i have in my form definition:

wd:repeater id=typesofthings
   wd:widgets
   wd:field id=label required=true
   wd:labelLabel:/wd:label
   wd:datatype base=string/
   /wd:field
   wd:field id=parameter required=true
   wd:labelParameter:/wd:label
   wd:datatype base=string/
   /wd:field
   wd:field id=id required=true
   wd:labelID:/wd:label
   wd:datatype base=string/
   /wd:field
   /wd:widgets

/wd:repeater

and I have a file:

typesofthings
   type
 id1/id
 labelFirst type of thing/label
 parameterT/parameter
   /type
   type
 id2/id
 labelSecond type of thing/label
 parameterK/parameter
   /type
   type
 id3/id
 labelThird type of thing/label
 parameterF/parameter
   /type
typesofthings
So when the select list is changed, it will add a repeater that is bound 
and filled in with the values from the file.

Am I even making sense?

JD

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


Re: AW: ServiceManager questions

2004-03-08 Thread Oscar Picasso
 hope that clarified it a bit.

Yes it does. Thanks.

I have read the Avalon docs and found the concepts quite interesting but its
sometimes overwhelming to try to apply these concepts in Cocoon when trying to
use generic components.

__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



Re: xsp upload nightmare

2004-03-08 Thread Z.Z.
Hello,
 [EMAIL PROTECTED] wrote:

 can i add your modification in a new wiki page ?
yes absolutely
 can you describe what else is this code make ?
I need to pass cocoon:/ to upload action. I am using cocoon on Linux, and my 
app is in my home directory. 
So link is: http://server:8080/cocoon/~user/app/
Originally upload action cannot handle this directory entry, because 
relative reference is relative to cocoon_install directory, and absolute 
reference is not known only ~user is signing  users's home.
It need to pass cocoon:/ to upload action, which is getting by

Source inputSource = resolver.resolveURI();
String sysId = inputSource.getURI();

from org.apache.excalibur.source.Source.

I attached source of Upload.java to this letter.

-- 
thx,

Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694
package com.zamek.cocoon.action;

import java.util.Map;

import org.apache.avalon.framework.parameters.Parameters;
import org.apache.cocoon.acting.AbstractAction;
import org.apache.cocoon.environment.Redirector;
import org.apache.cocoon.environment.SourceResolver;

import org.apache.cocoon.servlet.multipart.Part;
import org.apache.cocoon.environment.Context;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Request;
import org.apache.cocoon.environment.http.HttpRequest;
import org.apache.excalibur.source.Source;

import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.thread.ThreadSafe;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * This action takes care about file uploading.
 * as input parameters will be:br
 * number-of-files - int - specified in the upload formbr
 * file-form-field-prefix - name of form field
 * name of form field for processing will be file-form-field-prefix + number-of-files 
 * i.e. myfile1, ...br
 * upload-directory - path where the file/s will be savedbr
 * overwrite-file - deny, allow, renamebr
 * Action returns back to sitemap the path+name of uploaded files
 *
 * @author Roman Hrivik
 * 
 * modified by Zoltan Zidarics at 03/03/2004
 * - accept cocoon:/ in upload-directory
 *
 */
public class FileUpload extends AbstractAction {

	/* cached logger */
	Logger myLogger;

	/*is debug enabled */
	boolean isDebugEnabled;

	/* is warn enabled */
	boolean isWarnEnabled;

	/* is error enabled */
	boolean isErrorEnabled;

	/* number-of-files parameter name	 */
	private static final String PARAM_NUMBER_OF_FILES = number-of-files;

	/* file-form-field-prefix parameter name	 */
	private static final String PARAM_FILE_FORM_FIELD_PREFIX = file-form-field-prefix;

	/* upload-directory parameter name */
	private static final String PARAM_UPLOAD_DIRECTORY = upload-directory;

	/* overwrite-file parameter name */
	private static final String PARAM_OVERWRITE_FILE = overwrite-file;

	/* overwrite deny */
	private static final String OVERWRITE_DENY = deny;

	/*overwrite allow */
	private static final String OVERWRITE_ALLOW = allow;

	/* overwrite rename */
	private static final String OVERWRITE_RENAME = rename;

	/*default form prefix parameter name for file upload */
	private static final String DEFAULT_PARAM_FILE_FORM_FIELD_PREFIX = file;

	/*default upload directory WEB-INF/work	 */
	private static final String DEFAULT_PARAM_UPLOAD_DIRECTORY_VALUE =
		/WEB-INF/work/upload;

	/* file-form-field-prefix - name of form field */
	private String parFileFormFieldPrefix;

	/* number-of-files - int - specified in the upload form	*/
	private int parNumberOfFiles;

	/* upload-directory - path where the file/s will be saved	*/
	private String parUploadDirectory;

	/* overwrite-file - deny, allow, rename	*/
	private String parOverwriteFile;
	
	/* cocoon:/ */
	private static final String COCOON_ENTRY = cocoon:/;
	
/* avalons source result beginning with file: */
private final static String FILE_ENTRY = file:;

	/*Controls the processing against some values of the
	 *  codeDictionary/code objectModel and returns a
	 * codeMap/code object with values used in subsequent
	 * sitemap substitution patterns.
	 * NOTE: This interface is designed so that implentations can be 
	 * codeThreadSafecode.
	 * When an action is ThreadSafe, only one instance serves all requests : this
	 * reduces memory usage and avoids pooling.
	 * @param resolverThe codeSourceResolver/code in charge
	 * @param objectModel The codeMap/code with object of the
	 * calling environment which can be used
	 * to select values this controller may need
	 * (ie Request, Response).
	 * @param source  A source codeString/code to the Action
	 * @param parameters  The codeParameters/code for this invocation
	 * @param redirector
	 * @return 

Re: Need help on generating excel

2004-03-08 Thread Anna Bikkina
Can someone please answer my question.

Thanks in advance,
Anna.


On Friday 05 March 2004 04:47 pm, Anna Bikkina wrote:
 Hi,

 I have a application that has to generate html and excel with the same data.
 For now  I am trying to have 2 buttons one which would perform the query
 and display it in html

map:generate src=security.xsp type=serverpages/
 map:transform src=context:/historyserver/styles/search.xsl/
 map:serialize/

 where search.xsl is written to convert data to html tables.

 I have another button which converts the same data to excel . It performs
 query to the database and is expected to display data in excel. I am using
 the org.apache.cocoon.serialization.HSSFSerializer to perform this.

map:generate src=security.xsp type=serverpages label=raw/
 map:transform src=context:/historyserver/styles/page2xls.xsl/
 map:serialize type=xls/


 The first one works but the second one does not create a excel file. It 
creates an ill formatted html.
 When I view the xml that is  generated using views(with label raw) and copy
 the content to a xml file and use that as input to transform and then
 serialize to xls that works. It displays the output in excel.

  I am not understanding where it is going wrong.

 Can someone please tell me where I am going wrong. I have been trying to
 work on my sitemap and xsl files for over 2 days now but could not find the
 solution.

 Thanks,
 Anna.


 -
 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: Need help on generating excel

2004-03-08 Thread Neil Bacon
If you get different behavior from your xsp than from a file generator
that suggests the stream of generated SAX events is not the same (even
though when serialized as XML it looks the same). You could try using the
LogTransformer to see how the two SAX streams differ.
But first I'd examine the transformed XML in both cases as that might be
enough to point you in the right direction.
Maybe the xsp isn't using namespaces correctly.
Cheers,
Neil.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of Anna Bikkina
Sent: Tuesday, 9 March 2004 8:31 AM
To: [EMAIL PROTECTED]
Subject: Re: Need help on generating excel


Can someone please answer my question.

Thanks in advance,
Anna.


On Friday 05 March 2004 04:47 pm, Anna Bikkina wrote:
 Hi,

 I have a application that has to generate html and excel with the same
data.
 For now  I am trying to have 2 buttons one which would perform the query
 and display it in html

map:generate src=security.xsp type=serverpages/
 map:transform src=context:/historyserver/styles/search.xsl/
 map:serialize/

 where search.xsl is written to convert data to html tables.

 I have another button which converts the same data to excel . It performs
 query to the database and is expected to display data in excel. I am using
 the org.apache.cocoon.serialization.HSSFSerializer to perform this.

map:generate src=security.xsp type=serverpages label=raw/
 map:transform src=context:/historyserver/styles/page2xls.xsl/
 map:serialize type=xls/


 The first one works but the second one does not create a excel file. It
creates an ill formatted html.
 When I view the xml that is  generated using views(with label raw) and
copy
 the content to a xml file and use that as input to transform and then
 serialize to xls that works. It displays the output in excel.

  I am not understanding where it is going wrong.

 Can someone please tell me where I am going wrong. I have been trying to
 work on my sitemap and xsl files for over 2 days now but could not find
the
 solution.

 Thanks,
 Anna.


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



Windows only defect using form tag with enctype set

2004-03-08 Thread depub2
Defect:

The following defect occurs ONLY on the MS windows platform,
it does NOT occur on the linux platform.
Both platforms were setup with tomcat 4.1.29, and cocoon 2.1.4.

On the windows platorm, a woody form will lose it's data when
the enctype=multipart/form-data is specified in the form
template, for example:

wt:form-template action=#{$continuation/id}.kont
method=POST enctype=multipart/form-data

This enctype is required for proper operation of the upload
widget.

To see the problem for yourself, on a windows based server, simply add
enctype=multipart/form-data
to the form tag (see above) in
~/cocoon/samples/woody/forms/form2_template.xml
and then run the XML Binding sample.

In the test case, (very similar to the XML Binding demo), a
flowscript which uses the showForm() function does not exit.

It is believed that the showForm() call in the flowscript
never exits because validation always fails because we have a required field
(which is filled in with valid data by the user) and that field is null
because the widget is not being updated with the request data because of
this defect when enctype=multipart/form-data.

Again, this problem only occurs on the MS Windows platform
and works fine on a linux platform. The problem does not appear to be
browser dependent.


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



Re: Basic authentification with Soap

2004-03-08 Thread Johnson
Hi!

I found some message you will be interesting.
go to axis-user to group(http://marc.theaimsgroup.com/?l=axis-userr=1w=2)

Best Regards

Johnson

- Original Message - 
From: Hauke Ernst [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 09, 2004 12:44 AM
Subject: Basic authentification with Soap 


 Hello,
 
 In SoapHelper I saw some handling for basic authorization when invoking
 a password restricted soap web service. Does anyone know where is gets
 the username and passwd from? Is it taken from the session context /
 portal engine authentification or can I set these infos in my xsp page?
 
 Please help!
 
 Best regards, Hauke
 ___
 Hauke Ernst
 Bendit GmbH
 Innovative Interfaces
 Fahrenheitstr. 1
 D-28359 Bremen
 mobil +49 (174) 3224679
 fon +49 (421) 2208408
 fax +49 (421) 2208407
 email [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: Question about xslt bench

2004-03-08 Thread Joerg Heinicke
On 10.02.2004 10:09, MAHE Vincent FTRD/DIH/REN wrote:

I am running performance tests on a webapp using Cocoon 2.1.3 on Resin 2.1.9 with the IBM JVM.
 
I have installed the profiler which told me that most of time is spent on the xslt tranform in my pipeline (the setup time, not the processing time)
For the moment I'm using the default xalan XSLT processor.
 
So I have changed the use-store to true (the default value is false, I don't know why), and it increases response time a lot.
When this parameter is set to false, I can only have 22 simultaneous virtual users (if I want to have a web page in less than one second).
When this parameter is set to true, I can have 100 simultaneous virtual users (with pages produces in less than 2 seconds).
 
Here are my questions :
- what is the exact role of the use-store parameter ?
- what are the advantages/drawbacks of using this parameter ? Why is it set by default to false in Cocoon 2.1.3 ?
- what is the best xslt processor to use (Xalan, XSLTC, Saxon, ...). Are there any bench results about that, using Cocoon ?
 
It makes a lot of questions but It seems that xslt is the major performance point to tune. 
If there could be more details on the Cocoon documentation about that, it would be very helpfull for Cocoon starters like me.
Some very long time ago there was a memory leak issue AFAIK. The issue 
of use-store has been often discussed in the last year on the developers 
list, so you should find mails in the archives, e.g.

http://marc.theaimsgroup.com/?t=10469635302r=1w=4
http://marc.theaimsgroup.com/?t=10470474710r=1w=4
http://marc.theaimsgroup.com/?t=10644116154r=1w=4
http://marc.theaimsgroup.com/?t=10673724601r=1w=4
Joerg

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


Re: Problem mounting sitemaps in Cocoon 2.1.3

2004-03-08 Thread Joerg Heinicke
On 10.02.2004 16:45, Sander Buskens wrote:

Hi,

We're experiencing some problems mounting sitemaps in Cocoon 2.1.3.
Our application consists of a root sitemap that mounts a few subsitemaps but 
occasionally fails to mount one of these sitemaps.
The failure results in the following stacktrace:

Original Exception: java.lang.IndexOutOfBoundsException: Index: 4, Size: 2
at java.util.ArrayList.RangeCheck(ArrayList.java:491)
at java.util.ArrayList.get(ArrayList.java:307)
at 
org.apache.cocoon.components.EnvironmentStack.getCurrent(EnvironmentStack.java:74)
at 
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentManager.java:309)
at 
org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.createComponentManager(SitemapLanguage.java:113)
...
...
We've been tracing the framework in order to find out where exactly the error occurs and it appears to be the case that the 
SitemapLanguage.createComponentManager() tries to lookup a LoggerManager but fails to do so.
We're guessing the subsitemaps are trying to get the LoggerManager from the root sitemap but in some rare cases they fail acquiring it.

The problem sometimes doesn't occur when running the application but may start occurring the next time we take the same path through the webapplication.

We're kind of clueless about what's happening here and would be very thankful if 
someone could shed some light on what Cocoon is
trying to achieve and which parts of the configuration might be of influence on our 
problem.
Hello Sander,

I don't remember that this error occured or was mentioned already on a 
list, so that's probably the reason you got no answer. Maybe you can 
find out more details for the rare cases and also raise the issue on 
the developers list.

Joerg

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


Re: Cocoon and soap

2004-03-08 Thread Joerg Heinicke
On 11.02.2004 19:45, Anna Bikkina wrote:

When I tried to get the new xsl in the stylesheets I am getting an error
The element type META must be terminated by the matching end-tag /META.
and I do not have META any where. Can anyone please tell me what I am doing 
wrong here.
Naturally this means HTML is returned.

Joerg

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


Re: File Uploads With Flow, per the Wiki

2004-03-08 Thread Joerg Heinicke
On 11.02.2004 09:17, Mark Lundquist wrote:

This page:
http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithFlow
had an example of how to manage uploads using flow.  Unfortunately, the 
example didn't work out of the box.  To pull all the pieces together, 
you had to follow a link to Bugzilla and get two source file attachments 
to compile, and the details in the Wiki example didn't match the text of 
the patch description, which in turn didn't match up with the code in 
the patch.

Not so great for noobs such as myself!  So anyway, after I figured out 
how to get it all working (man, I learned a lot doing that! :-),
This exactly was the aim ;-)

I 
attached a .jar file to the Wiki page and amended/supplemented the 
example so that it will actually work.

It seems like this is sort of a FAQ... I remember reading posts on this 
list about it a few months ago, when I was still just starting to look 
at Cocoon.  Back then I didn't understand any of it... I was like, OK, 
yeah uploading a file, that's probably something I'll have to figure out 
how to do someday.  But even recently here I saw a post from a couple 
of weeks ago, where the poor guy tried to type in everything from the 
Wiki page verbatim, and it didn't work.  Dang it, now I can't find that 
post for the life of me!  So whoever you are, if you're out there I hope 
this helps :-)

Anyway... someday 2.1.4 will come out and we will have wd:upload, but 
until then hopefully this will help somebody out...
Thanks for your effort.

Joerg

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


Re: unescaping xml in XSP-page

2004-03-08 Thread Joerg Heinicke
On 11.02.2004 09:45, Erik Hofstra wrote:

Hi all,

I have a problem with my xml-string. From a XSP-page i call a JavaClass
which makes a SOAP-call. The JavaClass returns a XML document in
String type.
When i place this string in my page with xsp:expr the '' and '' of the
XML string are replaced with 'lt;' and 'gt;'. Because of this replacement
the transformer doesn't 'recognize' the tags.
I tried util:include-expr, unescapeXml, unescapeHtml and even the
string.replaceAll() method (:S) but nothing helps.
Does anyone knows how to solve this problem or has an idea?

Thanks!
Erik
btw, here is a piece of my XSP code:
xsp:logic
String xmlString = soapCall.doSOAPCall();
/xsp:logic
xsp:exprxmlString/xsp:expr
There are get-xml or getxml elements somewhere. Somebody else can 
probably tell you how to use them exactly, I never used them.

Joerg

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


Re: generator and request attribute

2004-03-08 Thread Joerg Heinicke
On 11.02.2004 11:39, Roman Hrivik wrote:

Hi

I have custom generator where I set to request.attribute any value
via
ObjectModelHelper.getRequest(objectModel).getAttribute(RESULT_KEY)
next in the sitemap I want there request attribute selector
to decide what transformer to use
this attribute is setted before any sax events generated.
but it seems from my logs that selector is executed before I set attribute
to request in generator.
Indeed. The pipeline must be built before any of the SAX processing 
starts. This means actions and selectors are executed before generators, 
transformers and serializers. This is also logical because the first SAX 
event goes immediately from the generator to the transformer. It is 
*not* waited until the generator finishs and sets some parameter, 
afterwards it goes on with the transformer.

Do you have any hints how to solve this problem?
My generator generate 2 diffrent XML depends of some logic behind.
Is it possible to do it some way?
Or should I better write transformer behind generator.
If you want to change the processing you have to move the deciding logic 
into an action.

Joerg

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


Re: actions parameter levels

2004-03-08 Thread Joerg Heinicke
On 11.02.2004 11:45, Jorg Heymans wrote:

Below sitemap snippet just seems so counter-intuitive that i thought 
i'ld share it.

map:match pattern=*.*
  map:act type=resource-exists
map:parameter name=url value=file://{1}.{2}/   
map:aggregate element=aggregation label=debug1
map:part src=file://{../1}.{../2}/
map:part src=cocoon:/{../1}/
/map:aggregate
..

The url action parameter does not need the extra {../} while the ones 
inside the aggregation do! (note that aggregation can be replaced by 
plain transformers etc)

I guess the reason is that the src parameter belongs to the action level 
itself.
Exactly.

Admit, this looks strange (and had me going for a few minutes!)
Therefore you can now use flow instead :) We know the 
counter-intuitiveness, but any change on this (they were discussed) 
would break backwards compatibility).

Joerg

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


caching of generated xsp

2004-03-08 Thread Jakob Schwendner [Public Image]



I use generated XSP in my setup, which is working 
fine using the following sitemap code:

map:match 
pattern="page-*.xsp" map:generate src="" 
type="serverpages"/map:transform 
src=""/map:serialize 
type="xml"/
/map:match

map:match pattern="page-*" 
map:generate src="" type="serverpages"/
 map:transform 
src=""/map:serialize 
type="html"/ /map:match
this is all working very well, does however 
generate and compile a 
new xsp everytime a new request is 
made.
If the source was a file resource instead of a 
'cocoon:/' source I take
that the xsp only gets compiled when the date of 
the source file is
newer than an existing compiled version. 

How can control the 'modified' date for a cocoon 
resource?

thanks,
Jakob


Issue in XMLByteStreamInterpreter with large files

2004-03-08 Thread Corin Moss
Title: Issue in XMLByteStreamInterpreter with large files






Hi All,


I've recently run into a brand new issue related to the above class, seemingly when it's used in conjunction with the TraxTransformer (in my case Xalan.)

What seems to be happening is that the deserialize method is not being passed a byte array (it's throwing the XMLDeserializer needs byte array for deserialization error.)

This is usually recreatable for the lifetime of the Cocoon instance, in most cases as soon as Tomcat is restarted the problem disappears. However, on some occasions, repeated re-requests of the pipeline _can_ result in a successful generation.

This is a fairly large document (1MB), with many name-spaces defined. I'm using v1.5 of the class, which supports long character events, but doesn't have the license changes - although Im sure that's not causing an issue ;)

The really interesting part, is that this error is thrown BEFORE we ever put the document through Xalan in the pipeline, although I guess that there could be an internal Cocoon process which is using Xalan for something and then throwing this error.

Has anyone else seen this particular problem? 


Thanks,


Corin



Corin Moss

Lead Developer

TVNZ Interactive


+64 9 916 7367

+64 21 403 054

[EMAIL PROTECTED]






CAUTION: This e-mail and any attachment(s) contains information
that is intended to be read only by the named recipient(s). It
may contain information that is confidential, proprietary or the
subject of legal privilege. This information is not to be used by
any other person and/or organisation. If you are not the intended
recipient, please advise us immediately and delete this e-mail
from your system. Do not use any information contained in it.


For more information on the Television New Zealand Group, visit
us online at http://www.tvnz.co.nz



Tomcat Versions and Garbage Collection

2004-03-08 Thread Gordon Anderson
hi

I've been looking into variations of performance with different versions of 
Tomcat to serve a website of approximately 6000 URLs using Cocoon 
2.1.4.  Performance was noticeably slower using Tomcat 4, the reason being 
garbage collection.

To turn garbage collection on using the Sun JVM, append

-Xloggc:/opt/tomcat/logs/garbage.log

to the CATALINA_OPTS variable, where /opt/tomcat is the location of your 
Tomcat instance.

Crawling the site using the free Xenu crawler tool, performance under 
Tomcat 4.1.27 degraded significantly after around 1000 URLs.  Examining the 
logs, the reason was soon obvious.

1334.524: [Full GC 518449K-518079K(518464K), 2.5774490 secs]
1337.102: [Full GC 518079K-518079K(518464K), 2.5330770 secs]
1339.654: [Full GC 518458K-518188K(518464K), 2.5701920 secs]
1342.224: [Full GC 518188K-518179K(518464K), 2.5360680 secs]
1344.802: [Full GC 518456K-518233K(518464K), 2.5695450 secs]
1347.371: [Full GC 518233K-518214K(518464K), 3.2225810 secs]
1350.610: [Full GC 518403K-518180K(518464K), 2.5540920 secs]
1353.164: [Full GC 518180K-518178K(518464K), 2.5558220 secs]
It was spending all its time garbage collecting!



Using Tomcat 5.0.19, after approx 3 hits on the site, the log is 
certainly more pleasing:
13435.211: [GC 749150K-686258K(765332K), 0.1123580 secs]
13442.140: [GC 755121K-692181K(765332K), 0.1140720 secs]
13449.131: [GC 761045K-700089K(769044K), 0.1324210 secs]
13449.265: [Full GC 700089K-233002K(769044K), 1.8186920 secs]
13460.298: [GC 301859K-245577K(765332K), 0.1021830 secs]
13468.507: [GC 314440K-254022K(765332K), 0.1221460 secs]
13476.208: [GC 322886K-259107K(765332K), 0.1037680 secs]
13482.677: [GC 327971K-267097K(765332K), 0.1375070 secs]
13492.732: [GC 335961K-274713K(765332K), 0.1315550 secs]
13500.313: [GC 343577K-279775K(765332K), 0.1020140 secs]
13508.526: [GC 348634K-286971K(765332K), 0.1172210 secs]
13517.606: [GC 355831K-292747K(765332K), 0.1061540 secs]

As you can see the Full GC (Full Garbage Collect) is happening 
sporadically, thus server performance is improved.

It should be noted that exactly the same WAR file and tomcatd / 
CATALINA_OPTS were used for both versions of Tomcat.

The parameters I have changed from the default installation:

garbage collection logging as above
set max heap size to 1000M
made NO CHANGES to the store janitor parameters
set all pool-max values for the objects I am using to 1024
Use Tomcat 5.0.19, JDK 1.4.2
CIncludes cached for 12 hours
Apache serving static files
As a little side note after the crawl had finished, I saw 700M of heap 
space being reclaimed by a garbage collect :)  This would indicate that the 
memory issues that were inherent with 2.1.2 have disappeared.

I hope the above is of interest to those having performance problems

Cheers

Gordon

Gordon Anderson
3months.com


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


Cocoon presentation

2004-03-08 Thread Arnaud De Brem
Hi,

do you know where I can find a good presentation of Cocoon (with advantages
 and disadvantages) ??
Thanks

Arnaud

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


[Paginator Sample] ClassCastException

2004-03-08 Thread Alex Romayev
Hi,

Paginator transformer seems to be broken in CVS.  The
sample produces: java.lang.ClassCastException.

Regards,
-Alex

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