Hey John,

I took your advice and spent some time culling through sitemap.log and discovered that BOTH redirects are taking place when I use internal redirects...it's just that the "test failed" redirect happens second, so I always see that result page (even though the action's operations in modifying the database, etc. are performed successfully).

Why this happens is still a mystery to me, but here's the sitemap log info showing this:

INFO (2004-07-28) 10:47.42:387 [sitemap] (/secure/doTest) http8443-Processor2/RedirectToURINode: Redirecting to 'cocoon:/showTestSucceededPage' at file:/usr/local/tomcat/webapps/cocoon/sitemap.xmap:1750:62

INFO (2004-07-28) 10:47.42:388 [sitemap] (/secure/doTest) http8443-Processor2/ForwardRedirector: Redirecting to 'cocoon:/showTestSucceededPage'

INFO (2004-07-28) 10:47.42:711 [sitemap] (/secure/doTest) http8443-Processor2/RedirectToURINode: Redirecting to 'cocoon:/showTestFailedPage' at file:/usr/local/tomcat/webapps/cocoon/sitemap.xmap:1755:68

INFO (2004-07-28) 10:47.42:712 [sitemap] (/secure/doTest) http8443-Processor2/ForwardRedirector: Redirecting to 'cocoon:/showTestFailedPage'

So I then tried--just for the heck of it--putting an html serializer right after the first redirect like this:

<map:match pattern="secure/doTest">
 <map:act type="perform-test">
   <!-- Test succeeded. -->
   <map:redirect-to uri="cocoon:/showTestSucceededPage"/>
   <map:serialize type="html"/>
 </map:act>

 <!-- Test failed. -->
 <map:redirect-to uri="cocoon:/showTestFailedPage"/>
</map:match>

And of course that didn't work either. :-) Sooo...maybe there's a bug with internal redirects?

BTW, I'm using the absolute latest stable version of Cocoon (2.1.5.1) on Tomcat 4.1.30. I upgraded just a few days ago...

Sonny

From: "John L. Webber" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: map:redirect-to...
Date: Wed, 28 Jul 2004 08:56:45 +0200

Hi Sonny,

I don't know that the action isn't relevant, since the redirect to showTestFailedPage should only happen if the action failed. Why the action fails using internal redirects and succeeds using HTTP redirects is mysterious.

The action could fail by throwing an unexpected exception, or by returning null, or if it's an XSPAction by setting <action:set-failure/>. There ought to be something in your sitemap.log showing what happened.

John

Sonny Sukumar wrote:

Hey John,

The test the action is performing is actually to see whether an email verification string is the same as what's in the backend database. In other words, somebody clicks a link in her email to complete registration by verifying her email address and this action checks the random string in in the link (a request param) against what's in the db. That's all. :-)

But again the weird thing is that it works when I use HTTP redirects, so doesn't that make the action moot to discuss? The action code is actually pretty simple and hasn't been changed in a long time, so it *seems* like that wouldn't be the problem.

Btw, when you mentioned the action possibly failing, did you mean the test it performs failing or did you mean some type of Exception being thrown from it?


<map:match pattern="secure/doTest"> <map:act type="perform-test"> <!-- Test succeeded. --> <map:redirect-to uri="cocoon:/showTestSucceededPage"/> </map:act>

 <!-- Test failed. -->
 <map:redirect-to uri="cocoon:/showTestFailedPage"/>
</map:match>

--
---------------------------------------------------------
Jentro Technologies GmbH
John L. Webber, Software Development
---------------------------------------------------------
Rosenheimer Str. 145e 81671 M�nchen
Tel. +49 89 189 169 80 mailto:[EMAIL PROTECTED]
Fax +49 89 189 169 99 http://www.jentro.com
---------------------------------------------------------
NOTICE: The information contained in this e-mail is confidential or may otherwise be legally privileged. It is intended for the named recipient only. If you have received it in error, please notify us immediately by reply or by calling the telephone number above and delete this message and all its attachments without any use or further distribution of its contents. Please note that any unauthorised review, copying, disclosing or otherwise making use of the information is strictly prohibited. Thank you.
---------------------------------------------------------


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


_________________________________________________________________
Overwhelmed by debt? Find out how to �Dig Yourself Out of Debt� from MSN Money. http://special.msn.com/money/0407debt.armx



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



Reply via email to