Re: Using Actions in Sitemaps

2001-07-23 Thread Berin Loritsch

Max Larsson wrote:
 
 Hello,
 
 i have written my own Action for C2. It works fine.
 But somehow the C2 always report resource not found.
 With resource i think C2 means the file i am requesting,
 because i cannot find any ClassNotFoundExceptions in any logs.
 
 I have configure in my sitemap the following to use the action
 
  ...
   map:actions
 map:action name=login-request src=LoginAction/
 map:action name=lang-select
 src=org.apache.cocoon.acting.LangSelect/
   /map:actions
  /map:components
  map:action-sets
   map:action-set name=helpdesk
map:act type=login-request/
   /map:action-set
  /map:action-sets
 
 ...
 
   map:match pattern=*.html
 map:act set=helpdesk
   map:generate type=serverpages src=helpdesk.xsp/
 map:serialize/
 /map:act
   /map:match
 
 ...
 
 The file helpdesk.xsp exists on my server. Because if i take the
 map:act element away like this it works fine:
 
   map:match pattern=*.html
  map:generate type=serverpages src=helpdesk.xsp/
  map:serialize/
   /map:match
 
 Another question, how is the syntax to use the action directly without
 an action set. If i take the example from the documentation C2 always
 reports incomplete pipeline.

Is your LoginAction 1) without any package, and 2) in the classpath?
Anytime you alter your classpath in ANY servlet, the servlet engine needs
to be restarted.  It's a fact of life.
 S/MIME Cryptographic Signature


Re: Using Actions in Sitemaps

2001-07-23 Thread Christian Haul

On 23.Jul.2001 -- 03:16 PM, Max Larsson wrote:
 
 Is your LoginAction 1) without any package, and 2) in the classpath?
 Anytime you alter your classpath in ANY servlet, the servlet engine needs
 to be restarted.  It's a fact of life.
 
 It's no problem with the classpath. Cocoon loads the class and executes it.
 I've checked it in the logs. The problem is in the sitemap, but i don't
 find enough documentation to solve it. This piece:
 
   map:match pattern=*.html
   map:generate type=serverpages src=helpdesk.xsp/
   map:serialize/
/map:match
 
 works fine. OK the LoginAction class isn't called. But if if change it to
 use it in the following way:
 
map:match pattern=*.html
  map:act set=helpdesk
map:generate type=serverpages src=helpdesk.xsp/
  map:serialize/
  /map:act
/map:match
 
 C2 delivers resource not found. It's not a problem with the LoginAction
 class.
 It gets loaded and executed without any problems. I can post the source if
 needed.

Mmmh, does it make sense to nest a subpipeline in a action *set* ?
Perhaps you wanted to use a single action? E.g.

  map:match pattern=*.html
map:act type=helpdesk
!--  --
  map:generate type=serverpages src=helpdesk.xsp/
  !-- no transformation needed ? --
  map:serialize/
/map:act
!-- you should have an else case here, since what happens if
 the action did not complete successfully ? --
  /map:match

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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




RE: Using Actions in Sitemaps

2001-07-23 Thread tom . klaasen

I'm going out on a limp (limb?) here, but:

This LoginAction, is this something you wrote yourself? If so, be sure that
the Map it returns is not null, because when it is, the components between
the action tags will not be executed.

return new HashMap(); should do the trick.

hth,
tomK

-Original Message-
From: Max Larsson [mailto:[EMAIL PROTECTED]]
Sent: maandag 23 juli 2001 15:16
To: [EMAIL PROTECTED]
Subject: AW: Using Actions in Sitemaps



Is your LoginAction 1) without any package, and 2) in the classpath?
Anytime you alter your classpath in ANY servlet, the servlet engine needs
to be restarted.  It's a fact of life.

It's no problem with the classpath. Cocoon loads the class and executes it.
I've checked it in the logs. The problem is in the sitemap, but i don't
find enough documentation to solve it. This piece:

  map:match pattern=*.html
  map:generate type=serverpages src=helpdesk.xsp/
  map:serialize/
   /map:match

works fine. OK the LoginAction class isn't called. But if if change it to
use it in the following way:

   map:match pattern=*.html
 map:act set=helpdesk
   map:generate type=serverpages src=helpdesk.xsp/
 map:serialize/
 /map:act
   /map:match

C2 delivers resource not found. It's not a problem with the LoginAction
class.
It gets loaded and executed without any problems. I can post the source if
needed.

Max


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

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