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
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]