[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-users
Subject:    Re: Sendmail Action Status
From:       Christian Haul <haul () dvs1 ! informatik ! tu-darmstadt ! de>
Date:       2003-09-18 13:20:47
[Download RAW message or body]

On 18.Sep.2003 -- 03:01 PM, Fleischer Roman wrote:
> Hello,
> 
> i try to use the sendmail action. When the mail is sent without any error,
> everything seems to work well. The {status} of the action is success. But
> when i use a non exixting EMail, i get an error "Ressource not found" I use
> the action like described in the example (on cocoon.apache.org)
> <map:match pattern="mail">
> 	<map:act type="sendmail">

> 			<map:generate src="{status}.xml"/>
> 			<map:serialize type="html"/>
> 	</map:act>
> </map:match>
> 
> I also create a user-error.xml and server-error.xml document. But when the
> Email is unknown, the action has no status. In the sitemap.log i get this
> entry:

> Can anybody help?

The above is intentional as actions should include pipeline parts
depending on the successful execution of the action. Therefore the
pipeline nested inside the map:act elements is included only upon
success. It is skipped if the action failed.

So, for your application, you need to 

  <map:act type="sendmail">
     <map:generate src="success.xml"/>
     <map:serialize/>
  </map:act>
  <map:generate src="{request-attr:org.apache.cocoon.acting.Sendmail}.xml"/>
  <map:serialize/>

Of course you could put everything outside as well

  <map:act type="sendmail"/>
  <map:generate src="{request-attr:org.apache.cocoon.acting.Sendmail}.xml"/>
  <map:serialize/>

Although no status is returned to the sitemap, it is still set as
request attribute.

HTH

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic