Re: Dynamic XSP resource

2002-08-21 Thread Carles Canellas

I think ( for my experience) you need to have
map:match pattern=menu.xsp in another pipeline,
not in the same thar the other match pattern. the
cocoon:/ references to another pipeline in the same
sitemap, not the same pipeline.

Carles.

 --- Tuomo Lesonen [EMAIL PROTECTED] escribió:  
 
 On Tue, 20 Aug 2002, Roger I Martin PhD wrote:
 
  Just from a quick look, the map:generate src for
 menu.html has cocoon: as
  a part of it relative path; do you have such a
 path and can such an animal
  be part of a url?
 
 I use cocoon:/ protocol to tell cocoon, that
 menu.xsp in not directly
 located on my hard drive, but it's a resource in the
 current sitemap. cocoon://
 would mean the parent sitemap. Generators in Cocoon
 (including the
 serverpages generator) can use the new cocoon:
 protocol, right?
 
 -Tuomo
 
 
  --Roger
  - Original Message -
  From: Tuomo Lesonen [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, August 20, 2002 4:57 AM
  Subject: Dynamic XSP resource
 
 
   Hi all!
  
   I have an XSP page which is extended with the
 Session Transformer before
   it is used as an resource for the serverpages
 generator. Here's my
   sitemap:
  
   map:match pattern=menu.xsp
 map:generate src=docs/menu.xsp/
 map:transform type=session/
 map:serialize type=xml/
   /map:match
  
   map:match pattern=menu.html
 map:generate type=serverpages
 src=cocoon:/menu.xsp/
 map:transform
 src=stylesheets/menu-html.xsl/
 map:serialize type=html/
   /map:match
  
   If I open menu.xsp in browser, everything
 looks ok. Session Transformers
   does the job and everything. But when opening
 menu.html Cocoon gives a
   NullPointerException.
  
   Seems like a bug, not sure though.
  
   Thanks in advance,
  
   -Tuomo
  
   org.apache.cocoon.ProcessingException: Exception
 during source resolving.:
   org.apache.excalibur.source.SourceException:
 Exception during processing
   of cocoon://intranet/menu.xsp:
 org.apache.cocoon.ProcessingException:
   Failed to execute pipeline.:
 java.lang.NullPointerException
   at
  

org.apache.cocoon.components.source.SourceUtil.handle(SourceUtil.java:136)
   at
  
 

org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.jav
  a:161)
   at
  
 

org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
  eSourcecode(ProgramGeneratorImpl.java:438)
   at
  
 

org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
  ogramGeneratorImpl.java:285)
   at
  
 

org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator
  .java:209)
   at
  
 

org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeli
  ne(AbstractProcessingPipeline.java:368)
   at
  
 

org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
 

.setupPipeline(AbstractCachingProcessingPipeline.java:297)
   at
  
 

org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
  tractProcessingPipeline.java:475)
   at
  
 

org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
  alizeNode.java:142)
   at
  
 

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
  keNodes(AbstractParentProcessingNode.java:83)
   at
  
 

org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
  e(PreparableMatchNode.java:163)
   at
  
 

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
  keNodes(AbstractParentProcessingNode.java:83)
   at
  
 

org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTyp
  eNode.java:155)
   at
  
 

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
  keNodes(AbstractParentProcessingNode.java:83)
   at
  
 

org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
  e(PreparableMatchNode.java:163)
   at
  
 

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
  keNodes(AbstractParentProcessingNode.java:107)
   at
  
 

org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
  ineNode.java:157)
   at
  
 

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
  keNodes(AbstractParentProcessingNode.java:107)
   at
  
 

org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
  linesNode.java:155)
   at
  
 

org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
  or.java:327)
   at
  
 

org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
  or.java:309)
   at
  
 

org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
  e.java:131)
   at
  
 

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
  keNodes(AbstractParentProcessingNode.java:83)
   at
  
 

org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
  e(PreparableMatchNode.java:163

Re: Dynamic XSP resource

2002-08-21 Thread Tuomo Lesonen

I tried that already, but no luck. If I remove the session:getxml tags
in the XSP file, everything works ok, which means that the path
(cocoon:/menu.xsp) is good.
This is weird!

This is what I have in the XSP file:

xsp:logic
  if(session:getxml context=authentication 
path=/authentication/data/access/==true){
xsp:content
  some-tags-here/
/xsp:content
  }
/xsp:logic

And after SessionTransformer this really becomes (I checked):

xsp:logic
  if(true==true){
xsp:content
  some-tags-here/
/xsp:content
  }
/xsp:logic

But when I use this as a source for the ServerPagesGenerator,
the NullPointerException occurs! :-(

Thanks for your answer, Carles.

-Tuomo

On Wed, 21 Aug 2002, Carles Canellas wrote:

 I think ( for my experience) you need to have
 map:match pattern=menu.xsp in another pipeline,
 not in the same thar the other match pattern. the
 cocoon:/ references to another pipeline in the same
 sitemap, not the same pipeline.

 Carles.

  --- Tuomo Lesonen [EMAIL PROTECTED] escribió: 
 
  On Tue, 20 Aug 2002, Roger I Martin PhD wrote:
 
   Just from a quick look, the map:generate src for
  menu.html has cocoon: as
   a part of it relative path; do you have such a
  path and can such an animal
   be part of a url?
 
  I use cocoon:/ protocol to tell cocoon, that
  menu.xsp in not directly
  located on my hard drive, but it's a resource in the
  current sitemap. cocoon://
  would mean the parent sitemap. Generators in Cocoon
  (including the
  serverpages generator) can use the new cocoon:
  protocol, right?
 
  -Tuomo
 
  
   --Roger
   - Original Message -
   From: Tuomo Lesonen [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Tuesday, August 20, 2002 4:57 AM
   Subject: Dynamic XSP resource
  
  
Hi all!
   
I have an XSP page which is extended with the
  Session Transformer before
it is used as an resource for the serverpages
  generator. Here's my
sitemap:
   
map:match pattern=menu.xsp
  map:generate src=docs/menu.xsp/
  map:transform type=session/
  map:serialize type=xml/
/map:match
   
map:match pattern=menu.html
  map:generate type=serverpages
  src=cocoon:/menu.xsp/
  map:transform
  src=stylesheets/menu-html.xsl/
  map:serialize type=html/
/map:match
   
If I open menu.xsp in browser, everything
  looks ok. Session Transformers
does the job and everything. But when opening
  menu.html Cocoon gives a
NullPointerException.
   
Seems like a bug, not sure though.
   
Thanks in advance,
   
-Tuomo
   
org.apache.cocoon.ProcessingException: Exception
  during source resolving.:
org.apache.excalibur.source.SourceException:
  Exception during processing
of cocoon://intranet/menu.xsp:
  org.apache.cocoon.ProcessingException:
Failed to execute pipeline.:
  java.lang.NullPointerException
at
   
 
 org.apache.cocoon.components.source.SourceUtil.handle(SourceUtil.java:136)
at
   
  
 
 org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.jav
   a:161)
at
   
  
 
 org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
   eSourcecode(ProgramGeneratorImpl.java:438)
at
   
  
 
 org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
   ogramGeneratorImpl.java:285)
at
   
  
 
 org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator
   .java:209)
at
   
  
 
 org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeli
   ne(AbstractProcessingPipeline.java:368)
at
   
  
 
 org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
  
 
 .setupPipeline(AbstractCachingProcessingPipeline.java:297)
at
   
  
 
 org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
   tractProcessingPipeline.java:475)
at
   
  
 
 org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
   alizeNode.java:142)
at
   
  
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
   keNodes(AbstractParentProcessingNode.java:83)
at
   
  
 
 org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
   e(PreparableMatchNode.java:163)
at
   
  
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
   keNodes(AbstractParentProcessingNode.java:83)
at
   
  
 
 org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTyp
   eNode.java:155)
at
   
  
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
   keNodes(AbstractParentProcessingNode.java:83)
at
   
  
 
 org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
   e(PreparableMatchNode.java:163)
at
   
  
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
   keNodes(AbstractParentProcessingNode.java:107

Re: Dynamic XSP resource

2002-08-20 Thread Roger I Martin PhD

Just from a quick look, the map:generate src for menu.html has cocoon: as
a part of it relative path; do you have such a path and can such an animal
be part of a url?

--Roger
- Original Message -
From: Tuomo Lesonen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 20, 2002 4:57 AM
Subject: Dynamic XSP resource


 Hi all!

 I have an XSP page which is extended with the Session Transformer before
 it is used as an resource for the serverpages generator. Here's my
 sitemap:

 map:match pattern=menu.xsp
   map:generate src=docs/menu.xsp/
   map:transform type=session/
   map:serialize type=xml/
 /map:match

 map:match pattern=menu.html
   map:generate type=serverpages src=cocoon:/menu.xsp/
   map:transform src=stylesheets/menu-html.xsl/
   map:serialize type=html/
 /map:match

 If I open menu.xsp in browser, everything looks ok. Session Transformers
 does the job and everything. But when opening menu.html Cocoon gives a
 NullPointerException.

 Seems like a bug, not sure though.

 Thanks in advance,

 -Tuomo

 org.apache.cocoon.ProcessingException: Exception during source resolving.:
 org.apache.excalibur.source.SourceException: Exception during processing
 of cocoon://intranet/menu.xsp: org.apache.cocoon.ProcessingException:
 Failed to execute pipeline.: java.lang.NullPointerException
 at
 org.apache.cocoon.components.source.SourceUtil.handle(SourceUtil.java:136)
 at

org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.jav
a:161)
 at

org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
eSourcecode(ProgramGeneratorImpl.java:438)
 at

org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:285)
 at

org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator
.java:209)
 at

org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeli
ne(AbstractProcessingPipeline.java:368)
 at

org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.setupPipeline(AbstractCachingProcessingPipeline.java:297)
 at

org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:475)
 at

org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:142)
 at

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
 at

org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:163)
 at

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
 at

org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTyp
eNode.java:155)
 at

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
 at

org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:163)
 at

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
 at

org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:157)
 at

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
 at

org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:155)
 at

org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:327)
 at

org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:309)
 at

org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
e.java:131)
 at

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
 at

org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:163)
 at

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
 at

org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:157)
 at

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
 at

org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:155)
 at

org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:327)
 at

org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:309)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:585)
 at
 org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1000)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247

Re: Dynamic XSP resource

2002-08-20 Thread Tuomo Lesonen



On Tue, 20 Aug 2002, Roger I Martin PhD wrote:

 Just from a quick look, the map:generate src for menu.html has cocoon: as
 a part of it relative path; do you have such a path and can such an animal
 be part of a url?

I use cocoon:/ protocol to tell cocoon, that menu.xsp in not directly
located on my hard drive, but it's a resource in the current sitemap. cocoon://
would mean the parent sitemap. Generators in Cocoon (including the
serverpages generator) can use the new cocoon: protocol, right?

-Tuomo


 --Roger
 - Original Message -
 From: Tuomo Lesonen [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, August 20, 2002 4:57 AM
 Subject: Dynamic XSP resource


  Hi all!
 
  I have an XSP page which is extended with the Session Transformer before
  it is used as an resource for the serverpages generator. Here's my
  sitemap:
 
  map:match pattern=menu.xsp
map:generate src=docs/menu.xsp/
map:transform type=session/
map:serialize type=xml/
  /map:match
 
  map:match pattern=menu.html
map:generate type=serverpages src=cocoon:/menu.xsp/
map:transform src=stylesheets/menu-html.xsl/
map:serialize type=html/
  /map:match
 
  If I open menu.xsp in browser, everything looks ok. Session Transformers
  does the job and everything. But when opening menu.html Cocoon gives a
  NullPointerException.
 
  Seems like a bug, not sure though.
 
  Thanks in advance,
 
  -Tuomo
 
  org.apache.cocoon.ProcessingException: Exception during source resolving.:
  org.apache.excalibur.source.SourceException: Exception during processing
  of cocoon://intranet/menu.xsp: org.apache.cocoon.ProcessingException:
  Failed to execute pipeline.: java.lang.NullPointerException
  at
  org.apache.cocoon.components.source.SourceUtil.handle(SourceUtil.java:136)
  at
 
 org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.jav
 a:161)
  at
 
 org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
 eSourcecode(ProgramGeneratorImpl.java:438)
  at
 
 org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
 ogramGeneratorImpl.java:285)
  at
 
 org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator
 .java:209)
  at
 
 org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeli
 ne(AbstractProcessingPipeline.java:368)
  at
 
 org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
 .setupPipeline(AbstractCachingProcessingPipeline.java:297)
  at
 
 org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
 tractProcessingPipeline.java:475)
  at
 
 org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
 alizeNode.java:142)
  at
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:83)
  at
 
 org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
 e(PreparableMatchNode.java:163)
  at
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:83)
  at
 
 org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTyp
 eNode.java:155)
  at
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:83)
  at
 
 org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
 e(PreparableMatchNode.java:163)
  at
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:107)
  at
 
 org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
 ineNode.java:157)
  at
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:107)
  at
 
 org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
 linesNode.java:155)
  at
 
 org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
 or.java:327)
  at
 
 org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
 or.java:309)
  at
 
 org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
 e.java:131)
  at
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:83)
  at
 
 org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
 e(PreparableMatchNode.java:163)
  at
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:107)
  at
 
 org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
 ineNode.java:157)
  at
 
 org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
 keNodes(AbstractParentProcessingNode.java:107)
  at
 
 org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
 linesNode.java:155

Re: Dynamic XSP

2001-09-05 Thread Christopher Painter-Wakefield


This approach is strongly discouraged.  If you try to do it this way, your
pages will take a long time to load, every time, because your second XSP
program will have to be recompiled every single time.  So, even if you can
make it work, you won't *want* to.

Is there some reason you are trying to do it this way?  What is it you are
trying to accomplish?  Perhaps we can suggest a better approach.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   cocoon-users [EMAIL PROTECTED]
cc:

Subject:  Dynamic XSP


Hi ,

I am using cocoon 1.8.2,
My xsp page receives an request and it produces an another xsp page,
i.e. my logic is
request ---xsp1--xsl-1---xsp2--xsl-2--html--response

I have done xsp1 and xsl-1 and i got xsp2 as a response.
I need to process the result once again.
How can i give the instruction to cocoon for that..
Any of you have experience like this?
Expecting reply
Thangadurai





-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Dynamic XSP

2001-09-04 Thread Thangadurai

Hi ,

I am using cocoon 1.8.2,
My xsp page receives an request and it produces an another xsp page,
i.e. my logic is
request ---xsp1--xsl-1---xsp2--xsl-2--html--response

I have done xsp1 and xsl-1 and i got xsp2 as a response.
I need to process the result once again.
How can i give the instruction to cocoon for that..
Any of you have experience like this?
Expecting reply
Thangadurai



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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