RE: Mounting Sub-Sitemap from outside cocoon-dir...

2003-02-25 Thread Laurent Comte
Some hints :

1/ As written in the doc, use :
src="file:///x:/some/folder/"

2/ On windows, use "/" in the path, not "\" (yes, it SHOULD be the
opposite ...)

As I wrote in a previous post, using subsitemaps that are not inside
the main sitemap seems to run into reloading problems, when updates
are made in the main sitemap file.

Look at the thread with the stange title :
"is this question too simple to be answered ?"

Regards.
Laurent


-Message d'origine-
De : Menke Jörg,E2 [mailto:[EMAIL PROTECTED]
Envoyé : mardi 25 février 2003 10:47
À : '[EMAIL PROTECTED]'
Objet : Mounting Sub-Sitemap from outside cocoon-dir...


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi!
For better integration into the versioning-system (clearcase in this
case) I tried to let the locally installed cocoon (running in Weblogic
7) mount a subsitemap on a different drive (I'm stuck on Windows at
the moment... :-( ). This did not work... Examples:


 


or


 


or


 


Is this possible at all? Eg: can you reference a sitemap, or even only
a ressources directory (for styles p.e.) that is outside the
cocoon-installation?

Thanks in advance,

cu, Jörg

-BEGIN PGP SIGNATURE-
Version: PGP 6.0.2

iQA/AwUBPlstjf+R/hOShE1OEQJrbwCbBs7N+CWYrYAa9iGx0JLdso9yAloAoNSS
jkuV9MVtopDvK/MiDCjSxyxA
=sS11
-END PGP SIGNATURE-

-
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: How can I handle session expiration event

2003-02-24 Thread Laurent Comte



Hi 
(bonjour) Vincent,
 
you 
can certainly look at HttpSessionListener, as Cocoon is a java web-application 
after all.
 
Regards.Laurent.

  -Message d'origine-De : MAHE Vincent 
  FTRD/DIH/REN 
  [mailto:[EMAIL PROTECTED]Envoyé : lundi 24 
  février 2003 15:08À : 
  [EMAIL PROTECTED]Objet : How can I handle session 
  expiration event
   
  Is there a way to 
  handle session expiration events with cocoon ?
   
  I would like to 
  launch some cleaning job when a session expires, is it possible 
  ?
   
  Vincent
   


RE: Cocoon as a DataMapper framework

2003-02-24 Thread Laurent Comte
Hi Luca,

I'm writing a web-application (servlets + POJO) that use Cocoon for 
presentation, so my application is Controller+Model, and Cocoon is 
View (plus Controller if I need), MVC model speaking.


My application generate data (response) in XML, and then I forward
the original request using "/view" alias, pointing to the main 
Cocoon servlet. AFAK, i's a servlet, so you can call it like another
one ...

Regards.
Laurent


-Message d'origine-
De : Luca Zago [mailto:[EMAIL PROTECTED]
Envoye : lundi 24 fevrier 2003 14:27
A : [EMAIL PROTECTED]
Objet : Cocoon as a DataMapper framework


Hi,
I was thinking about a data mapper framework, a framework which can take 
data from a source and write to another destination. An application 
scenario could be taking an xml somewhere (XML DB, HTML forms) and then 
writing it to a traget XML or even Relational DB.
Then I was thinking why not to use cocoon to do it.
I had some doubts, the nice thing could be that I write mainly the xml 
files for transformation and the pipelines, and then the framework works 
for me, my doubts are that coccon is too 'content delivery oriented' to 
apply such features. is cocoon in your opinion enough flexible to use it 
in such a scenario with not a great load of coding?
Has somebody experienced such an application scenario for coccoon?
One limitation immediately came to my mind is that cocoon works with a 
request from client, is it possible to call a pipeline programmatically?

Thank you very much n advance for suggestions and opinions.

Luca


-- 
Luca Zago
Senior IT Developer
_

E-TREE S.p.a.  Via Fonderia 43 - 31100 Treviso (Italy)
phone +39.0422.3107
fax   +39.0422.310888
http://www.e-tree.com  http://www.webanana.com
_


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




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



RE: Sitemap parameters lifetime

2003-02-20 Thread Laurent Comte



It 
seems I must post the same question twice to have an answer 
:)
 
Regards.Laurent.

  -Message d'origine-De : Laurent Comte 
  [mailto:[EMAIL PROTECTED]]Envoyé : jeudi 20 février 2003 
  13:09À : [EMAIL PROTECTED]Objet : 
  Sitemap parameters lifetime
  As described 
  at
  http://xml.apache.org/cocoon/userdocs/concepts/actions.html,
   
  you can set 
  sitemap param as :
  sitemapParams.put("world", 
  "hello");
  I think it 
  must be said what is the lifetime of the param 
  "world".
   
  Because 
  after the execution of the pipeline where this 
  parameter
  is setted (via an 
  Action), the value of parameter "world" is still "hello" !
   
  So are you 
  agree with :
   
  "Sitemap 
  parameters are "global" parameters ?
  And not "local" to 
  a pipeline ?"
   
  I think it's 
  important ...
   
  Laurent.


RE: XPath problems in Cocoon?

2003-02-20 Thread Laurent Comte



Not the answer but ...
 
Are you obliged to base your algorithm on 
the presence of whitespaces ?
 
If your html file is like :
One>  Two>
 
, I won't bet a 
cent on how it will be rendered after the generator process 
...
 
Perhaps they will be 
suppressed, or what else ?  ...
 
And perhaps I didn't 
understood what you want to get exactly ...
 
Laurent.

  -Message d'origine-De : Anna Afonchenko 
  [mailto:[EMAIL PROTECTED]]Envoyé : jeudi 20 février 2003 
  12:57À : cocoon-usersObjet : Re: XPath 
  problems in Cocoon?
   
  I tried it with XPathVisualizer tool, and it gives 
  right result.
  But when I tried to run the stylesheet through the 
  batch file using Saxon, I also
  got empty result.
  So I am really confused.
  Maybe somebody can suggest another XPath to 
  accomplish this?
  I want to choose all a tags for which the first 
  following tag that is not a white-space only text
  is also a tag, e.g. when there are adjacent a tags with no 
  separate characters between them.
  This seems to be not too complex XPath, and the XPath that I 
  constructed:
  //a[name(following-sibling::node()[1][not(self::text() and 
  normalize-space())])='a']
   
  seems to be rather intuitive, so I am really confused why it doesn't 
  work.
  Moreover, why it DOES work in XMLSpy/XPathVisualizer and DOESN"T work 
  with Saxon/Cocoon.
   
  I am really confused and will really appreciate any help with this 
  issue.
   
  Thank you very much for help.
   
  Anna
  
- Original Message - 
From: 
Derek Hohls 

To: [EMAIL PROTECTED] 

Sent: Thursday, February 20, 2003 1:27 
PM
Subject: Re: XPath problems in 
Cocoon?

Hmm - I tried this same transform using Jame Clarke's
XT program (old, but normally robust) and I got the 
same result -  

xml version="1.0" encoding="utf-8" ?> 

  
 
I am not an XSLT guru - are you sure the syntax is not
specific to XML spy??  Have you tried with some other
XSLT engine?
 
Derek
>>> [EMAIL PROTECTED] 20/02/2003 01:04:47 
>>>
Derek
 
I don't get any error message, at least not in 
WEB-IN/logs/error.log
I get an xml document in the browser:

xml version="1.0" encoding="utf-8" ?> 

   
 
i.e., the stylesheet was applied successfully, it 
just didn't match anything.
Maybe my XPath expression is wrong, but then how 
comes it works in XMLSpy?
 
Thanks for answering
Anna

  - Original Message - 
  From: 
  Derek Hohls 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, February 20, 2003 
  12:51 PM
  Subject: Re: XPath problems in 
  Cocoon?
  
  Anna
   
  What type of error message do you get in the log 
  files?>>> [EMAIL PROTECTED] 20/02/2003 12:40:10 
  >>>
  Hi all. I am not sure that this message is 
  related to Cocoon, so I apologize,
  if this is not appropriate 
  here.
   
  I have a very simple html - 
  test.html:
  
  >
  Test anchors>
  >
  >
  test anchors>
  One>  Two>
  separator>
  One1>
  />
  Two1>
  separator>
  One2>
  some text
  Two2>
  >
  html>
   
  I want to choose the 'a' nodes for which first following node that is 
  not a white-space only node is 'a' node. E.g. in the html above only the 
  first 'a' node should be picked up.
  I wrote a very simple xsl - test.xsl:
  
  
  >
  
  
  >
  >
  >
  xsl:stylesheet>
   
  When I apply this stylesheet on my test.html using XMLSpy's XSL 
  Transformation Tool, I get this xml:
  One, e.g. it chose correctly the first a 
  node.
  But when I apply this stylesheet using Cocoon, I get empty 
   as a result, e.g. in Cocoon nothing is chosen.
  Here is my pipeline:
  
  
  
  
  >
   
  Can somebody 
  explain me what is wrong with my stylesheet and why doesn't it work using 
  Cocoon?
   
  Thank you very 
  much for help and sorry if this is not too much 
  related.
   
  Best 
  regards,
   
  Anna-- This message has been 
  scanned for viruses and dangerous content by MailScanner, and is 
  believed to be clean. "The CSIR exercises no editorial control 
  over E-mail messages and/or attachments thereto/links referred to 
  therein originating in the organisation and the views in this 
  message/attachments thereto are therefore not necessarily those of the 
  CSIR and/or its employees. The sender of this e-mail is, moreover, in 
  terms of the CSIR's Conditions of Service, subject to compliance with 
  the CSIR's internal E-mail and 

Sitemap parameters lifetime

2003-02-20 Thread Laurent Comte



As described 
at
http://xml.apache.org/cocoon/userdocs/concepts/actions.html,
 
you can set 
sitemap param as :
sitemapParams.put("world", 
"hello");
I think it 
must be said what is the lifetime of the param 
"world".
 
Because after 
the execution of the pipeline where this parameter
is setted (via an 
Action), the value of parameter "world" is still "hello" !
 
So are you 
agree with :
 
"Sitemap parameters 
are "global" parameters ?
And not "local" to a 
pipeline ?"
 
I think it's 
important ...
 
Laurent.


RE: Is this question too simple to be answered ?

2003-02-20 Thread Laurent Comte



I don't think so because just a "fake" 
modification in the subsitemap
file (just to change the date of the file) 
makes things go right.
 
I think the problem is a Cocoon's reload 
problem or the problem is ME.
 
Laurent.
 
nb : from the beginning, Cocoon is very 
horrible with me ...

   = 
  Null Pointer exceptions are my worst ;-( but often
  the root problem is a simple one  - it sounds like
  something is wrong with the 
subsitemap


RE: XPath problems in Cocoon?

2003-02-20 Thread Laurent Comte



 
Perhaps a trail :
 
You use ,
so perhaps after the 
generator process, your html page is not 
EXACTLY the same as your 
static html file, and your Xpath expression
fails.
 
I think you can trace Cocoon outputs 
during pipeline process as described 
in the documentation.
Regards.Laurent

  -Message d'origine-De : Anna Afonchenko 
  [mailto:[EMAIL PROTECTED]]Envoyé : jeudi 20 février 2003 
  12:05À : [EMAIL PROTECTED]Objet : 
  Re: XPath problems in Cocoon?
  Derek
   
  I don't get any error message, at least not in 
  WEB-IN/logs/error.log
  I get an xml document in the browser:
  
  xml 
  version="1.0" encoding="utf-8" ?> 
  
     
   
  i.e., the stylesheet was applied successfully, it 
  just didn't match anything.
  Maybe my XPath expression is wrong, but then how 
  comes it works in XMLSpy?
   
  Thanks for answering
  Anna
  
- Original Message - 
From: 
Derek Hohls 

To: [EMAIL PROTECTED] 

Sent: Thursday, February 20, 2003 12:51 
PM
Subject: Re: XPath problems in 
Cocoon?

Anna
 
What type of error message do you get in the log 
files?>>> [EMAIL PROTECTED] 20/02/2003 12:40:10 
>>>
Hi all. I am not sure that this message is related 
to Cocoon, so I apologize,
if this is not appropriate here.
 
I have a very simple html - 
test.html:

>
Test anchors>
>
>
test anchors>
One>  Two>
separator>
One1>
/>
Two1>
separator>
One2>
some text
Two2>
>
html>
 
I want to choose the 'a' nodes for which first following node that is 
not a white-space only node is 'a' node. E.g. in the html above only the 
first 'a' node should be picked up.
I wrote a very simple xsl - test.xsl:


>


>
>
>
xsl:stylesheet>
 
When I apply this stylesheet on my test.html using XMLSpy's XSL 
Transformation Tool, I get this xml:
One, e.g. it chose correctly the first a 
node.
But when I apply this stylesheet using Cocoon, I get empty 
 as a result, e.g. in Cocoon nothing is chosen.
Here is my pipeline:




>
 
Can somebody 
explain me what is wrong with my stylesheet and why doesn't it work using 
Cocoon?
 
Thank you very 
much for help and sorry if this is not too much related.
 
Best 
regards,
 
Anna-- This message has been 
scanned for viruses and dangerous content by MailScanner, and is believed 
to be clean. "The CSIR exercises no editorial control over E-mail 
messages and/or attachments thereto/links referred to therein 
originating in the organisation and the views in this 
message/attachments thereto are therefore not necessarily those of the 
CSIR and/or its employees. The sender of this e-mail is, moreover, in 
terms of the CSIR's Conditions of Service, subject to compliance with 
the CSIR's internal E-mail and Internet Policy." 



RE: Is this question too simple to be answered ?

2003-02-20 Thread Laurent Comte



 
Yes, I read it already.
 
So I have check-reload="yes" and 
reload-method="synchron",
BUT the problem is :
 
If I update the main sitemap file without 
updating the subsitemap file,
I obtain a NullPointerException during 
parsing of the subsitemap file.
 
If I make a fake update in the subsitemap 
file, it works.
 
Even If I make a fake update in the MAIN 
sitemap file, I've got the Exception.
 
 
Regards.
Laurent
 
 
 
===
but for (2) look at the documnentation for the

  reload-method="synchron" attribute/value.
   
  (example under:
  http://wiki.cocoondev.org/Wiki.jsp?page=BeginnerSWTutorial_01
  and
  http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html
    - in the section 'Reloading'_
   


RE: Is this question too simple to be answered ?

2003-02-20 Thread Laurent Comte
Hi, and thanks for your reply :)


Try relative location for your files.


The problem is that my subsitemap is not located in a subfolder
under the main sitemap. So I must specify as "src" something like
"../../../Apache/htdocs/myFolder/itsHere". Humf!

==> BUT, finally I found 2 interesting things :

1/ Even in Windows, if I specify the path as "file:///D:/work/web.xmap"
   instead "file:///D:\work\web.xmap", it works ! Not really logic.

2/ When I change something in the main sitemap without updating the
subsitemap
   file, it fails ! I must make a "fake" modification in the subsitemap file
to
   make things working ...


A little bit confusing, isn't it ?

BTW, do you have the same behaviours (I use 2.0.4) ???

Laurent.


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Is this question too simple to be answered ?

2003-02-20 Thread Laurent Comte
Hi,

is this question too simple to be answered ?

-Message d'origine-
De : Laurent Comte [mailto:[EMAIL PROTECTED]]
Envoyé : mercredi 19 février 2003 13:25
A : [EMAIL PROTECTED]
Objet : Simple pb with subsitemap mount



Hi,

I just try to create subsitemap as written in docs.

I have :

[sitemap.xmap]
...
  






  
...


[D:\work\web.xmap]
...


  



  

  
...


So, when I type http://localhost:8080/cocon/view/index.xml, i've got this
beautiful thing :



description org.apache.cocoon.ProcessingException: Exception during
processing of file:/D:/index.xsl: java.io.FileNotFoundException: \index.xsl
(The system cannot find the file specified)

sender org.apache.cocoon.servlet.ParanoidCocoonServlet

source Cocoon servlet

stack-trace

org.apache.cocoon.ProcessingException: Exception during processing of
file:/D:/index.xsl: java.io.FileNotFoundException: \index.xsl (The system
cannot find the file specified)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:211)
at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:268)
at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:239)
at
org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:
298)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:215)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven
tPipeline.java:278)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(Cachi
ngEventPipeline.java:141)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:317)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.matchN10224(D:\Java\Oodrive\Tom
cat\work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1530
)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.process(D:\Java\Oodrive\Tomcat\
work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1439)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.process(D:\Java\Oodrive\Tomcat\
work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1385)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.www.sitemap_xmap.matchN1020C(D:\Java\Oodrive\Tomcat\work\c
ocoon-files\org/apache/cocoon/www\sitemap_xmap.java:1447)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo
n-files\org/apache/cocoon/www\sitemap_xmap.java:1394)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo
n-files\org/apache/cocoon/www\sitemap_xmap.java:1340)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportVa

Simple pb with subsitemap mount

2003-02-19 Thread Laurent Comte

Hi,

I just try to create subsitemap as written in docs.

I have :

[sitemap.xmap]
...
  






  
...


[D:\work\web.xmap]
...


  



  

  
...


So, when I type http://localhost:8080/cocon/view/index.xml, i've got this
beautiful thing :



description org.apache.cocoon.ProcessingException: Exception during
processing of file:/D:/index.xsl: java.io.FileNotFoundException: \index.xsl
(The system cannot find the file specified)

sender org.apache.cocoon.servlet.ParanoidCocoonServlet

source Cocoon servlet

stack-trace

org.apache.cocoon.ProcessingException: Exception during processing of
file:/D:/index.xsl: java.io.FileNotFoundException: \index.xsl (The system
cannot find the file specified)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:211)
at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:268)
at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:239)
at
org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:
298)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:215)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven
tPipeline.java:278)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(Cachi
ngEventPipeline.java:141)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:317)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.matchN10224(D:\Java\Oodrive\Tom
cat\work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1530
)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.process(D:\Java\Oodrive\Tomcat\
work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1439)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.process(D:\Java\Oodrive\Tomcat\
work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1385)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.www.sitemap_xmap.matchN1020C(D:\Java\Oodrive\Tomcat\work\c
ocoon-files\org/apache/cocoon/www\sitemap_xmap.java:1447)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo
n-files\org/apache/cocoon/www\sitemap_xmap.java:1394)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo
n-files\org/apache/cocoon/www\sitemap_xmap.java:1340)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at

RE: Using a RequestAttributeSelector

2003-02-17 Thread Laurent Comte


>let me quote a comment from the virgin cocoon sitemap:
>
>
>  Since this is important, let me repeat it: Selectors are executed
>  during pipeline setup.
>
>
>the same goes for matchers and actions.
>
>what this means is that the RequestAttributeSelector is done before your
>generation step in the pipeline even starts. so, yes, the selector was
>acting on the original request (someUrl in your pipeline).

Right. I thought it was the case only for actions ...



>another issue: I think it wouldn't even work when the selector would
execute
>after the generation step, because you are selecting on a request
attribute;
>but you're generating from the url, i.e. you make a request, you don't
>process it. so having the servlet set a request attribute is useless, since
>it generates a response, not a request.

Right again ...



>apart from that I wonder why you'd want an external servlet as a
controller.
>and I don't have any good idea (besides ugly stuff) how to do what you want
>to achieve.

I don't want use an external servlet as a controller, but as a generator (to
produce XML dynamically).
I'de like to found a good way to select the right "View" dynamically,
depending
of the result of the generator-servlet. It's not necessary with a servlet.
Perhaps it's not possible yet with Cocoon ?


Laurent.




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Using a RequestAttributeSelector

2003-02-14 Thread Laurent Comte
I would like to :

1/ use a servlet (servDoSomething) as a generator to generate some XML data.

2/ depending of what happened in step 1 (everything was fine or some error
   happened), I would like to set a "nextpage" attribute to say where should
   we go next :

request.setAttribute("nextpage", "ok")
or
request.setAttribute("nextpage", "error")

3/ in the pipeline, I want to select the good stylesheet depending of this
   attribute. So I tried to use the RequestAttributeSelector, because i've
put
   the attribute "nextpage" in the request.



BUT, it seems that the request read by the selector is the original one (or
something like this), and my attribute is never found ...
I used the logger of the RequestAttributeSelector and it says :

"RequestAttributeSelector: Request attribute 'nextpage' not set -- failing"


So, i'de like to find a good way to select my transformer at runtime,
depending
of the result of the generator-servlet.

We can say : using a kind of "Controller" to choose the right "View",
depending
of the result of an action in the "Model".

Any ideas ?

Laurent.




Cocoon 2.0.4 ; J2SE 1.4.1 ; Tomcat 4.1.18 ; Win2000 SP3



 nextpage




http://localhost:8080/web/servDoSomething"; />



 





  



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: Using a servlet as source for a generator

2003-02-14 Thread Laurent Comte


>> It seems that it check if uri begin with "http".

>That is what I thought as well. But
>http://wiki.cocoondev.org/Wiki.jsp?page=IntegrateAServlet
>seems to indicate otherwise.

Yes, but the author of this article told me that he didn't test it ! :-/
He will going to change his article ...


>> Does it work with "https" ???

>I don't think FileGenerator supports this.
>But you can try WebServiceProxyGenerator which uses commons-http client
>which supports https.

 In this case, i've got an SSL exception (certainly because i didn't
configure SSL
on my server), so it seems to look the ressource in the good place ...


Laurent.


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: Using a servlet as source for a generator

2003-02-14 Thread Laurent Comte


>OK, one last guess:
>

I tried for 2 hours all sorts of things :(( ...
The only one working is with the full url ...

I think that for Cocoon:

1/ there's some confusion between "src" and "uri" attribute for the
generator
2/ there's some confusion on how to know if uri is internet-uri or
filesystem-uri ...
It seems that it check if uri begin with "http". Does it work with "https"
???


>If this does not work I would go with:
>http://{request:serverName}:{request:serverPort}{request:contextPath}/
m


>AFAIK input modules have been backported to 2.0.5-dev

I use only 2.0.4 prod version, i have enough problems with it :)

Regards,
Laurent


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: Using a servlet as source for a generator

2003-02-14 Thread Laurent Comte

>Sorry, it should be
>

I've tried also, but in this case, it looks the ressource on the file system
(FileNotFoundException) ...

Laurent




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: Using a servlet as source for a generator

2003-02-14 Thread Laurent Comte


>I think it doesn't fit your servlet mapping.
>Try
>

It doesn't work ... It couldn't "setup pipeline" with an
"org.apache.cocoon.ProcessingException: Could not setup pipeline.:
org.xml.sax.SAXException: Invalid System ID"


>If this doesn't work either and you are using 2.1 you can also try
>uri="http://{request:serverName}:{request:serverPort}{request:contextPath}/
m
>yServlet"/>

Doesn't work with 2.0.4 ...


>I believe this also works for 2.0.5-dev

Did not tried yet.


Regards.


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Using a servlet as source for a generator

2003-02-13 Thread Laurent Comte


Hi all,

i've read the article at
http://wiki.cocoondev.org/Wiki.jsp?page=IntegrateAServlet and i have a
question ...

I tried to use a servlet as a source for a generator and it works when i set
the full url of the servlet (like "http://localhost:8080/myApp/myServlet";).

Unfortunately, when i dont't specify the full url but the "servlet-mapping"
(like "/myApp/myServlet") for src, i've got a weird error (see below) ...

Of course, when i type the same url in my browser, it works
("http://localhost:8080/myApp/myServlet";). Cocoon and my servlet are in the
same webApp (and same Tomcat's Context).

Does it really work for you ?

sitemap.xmap is standard and i had just added this :

  

  
  

  


My conf:

Win2000 SP3
J2SE 1.4.1_01
Tomcat 4.1.18
Cocoon 2.0.4


== The Error :


type fatal

message Exception during processing of file:/D:/myApp/myServlet

description org.apache.cocoon.ProcessingException: Exception during
processing of file:/D:/myApp/myServlet: java.io.FileNotFoundException:
\myApp\myServlet (The system cannot find the path specified)

sender org.apache.cocoon.servlet.ParanoidCocoonServlet

source Cocoon servlet

stack-trace

org.apache.cocoon.ProcessingException: Exception during processing of
file:/D:/myApp/myServlet: java.io.FileNotFoundException: \myApp\myServlet
(The system cannot find the path specified)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:211)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:250)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:399)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo
n-files\org/apache/cocoon/www\sitemap_xmap.java:1449)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo
n-files\org/apache/cocoon/www\sitemap_xmap.java:1340)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1040)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151
)
at java.lang.Thread.run(Thread.java