I have used the XSP-as-action method to do
redirection in the sitemap (based on the requestor's url), but one limitation is
that it only allows a binary choice: if the action succeeds go to one url, if
the action fails go to a different url. How can a pipeline be set up to allow
more than just two possible redirect pathways?
Wayne
-----Original Message-----
From: Derek Hohls [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 7:57 AM
To: [EMAIL PROTECTED]
Subject: RE: redirection in XSP?AlbanIts about concepts - XSP are intended to be *generators* ofinformation, and the sitemap to handle the *flow of logic* inthe app as a whole. This is in line with the underlying philosophyof "separation of concerns". Given the generator is at the start of apipeline it does make much sense for it to handle redirection.So, my suggestion is to look at your app *as a whole* and thendecide on the appropriate components within Cocoon to handlethe situations that arise. Yes, this will probably involve somemore work (and likely some worthwhile refactoring), but I thinkyou will find you end up with a more robust system.My 2cDerekPS There is also a link off the page below to a wiki pageon creating actions using XSPs.... this may help.PPS You could of course take a step backwards and useCocoon 1 (which does allow XSP redirection) - maybe quickerin the short term but I think not so good in the long term.
>>> [EMAIL PROTECTED] 20/02/2003 02:39:15 >>>After reading the page, I am a bit lost.Doesn't that mean the redirection has to be in an action? Why doesn't it work within xsp (or why not recommended)? From what I have seen in the cocoon source, there is a sendRedirect method on HttpResponse class.In fact, I have about 60 somethng pages and 15 of them require the use of redirection if necessary. Does that mean I need to write 15 actions and on action per xsp page? This will end up sitemap being very large as well. It is somehow kind of breaking up the logic... because each action per xsp and I believe they should be in the same place.Any more suggestions would be appreciated.Alban-----Original Message-----
From: Derek Hohls [mailto:[EMAIL PROTECTED]]
Sent: 20 February 2003 10:56
To: [EMAIL PROTECTED]
Subject: Re: redirection in XSP?AlbanLook at:Derek
>>> [EMAIL PROTECTED] 20/02/2003 12:14:01 >>>
Hi
I want to write a couple of XSP pages. The first one would read the request
parameters and continue if the parameters satisfy some conditions but if
they don't I want it to redirect the processing to another XSP. Is this
possible?
Currently the above process is done by jsp pages... and using something like
within the jsp:
response.sendRedirect(requestURI);
Alban
This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so. Thank you.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.
"The CSIR exercises no editorial control over E-mail messages and/or
attachments thereto/links referred to therein originating in the
organisation and the views in this message/attachments thereto are
therefore not necessarily those of the CSIR and/or its employees.
The sender of this e-mail is, moreover, in terms of the CSIR's Conditions
of Service, subject to compliance with the CSIR's internal E-mail and
Internet Policy."
This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.
--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.
"The CSIR exercises no editorial control over E-mail messages and/or
attachments thereto/links referred to therein originating in the
organisation and the views in this message/attachments thereto are
therefore not necessarily those of the CSIR and/or its employees.
The sender of this e-mail is, moreover, in terms of the CSIR's Conditions
of Service, subject to compliance with the CSIR's internal E-mail and
Internet Policy."