Alban
Its about concepts - XSP are intended to be *generators* of
information, and the sitemap to handle the *flow of logic* in
the app as a whole. This is in line with the underlying philosophy
of "separation of concerns". Given the generator is at the start of a
pipeline it does make much sense for it to handle redirection.
So, my suggestion is to look at your app *as a whole* and then
decide on the appropriate components within Cocoon to handle
the situations that arise. Yes, this will probably involve some
more work (and likely some worthwhile refactoring), but I think
you will find you end up with a more robust system.
My 2c
Derek
PS There is also a link off the page below to a wiki page
on creating actions using XSPs.... this may help.
PPS You could of course take a step backwards and use
Cocoon 1 (which does allow XSP redirection) - maybe quicker
in the short term but I think not so good in the long
term.
>>> [EMAIL PROTECTED] 20/02/2003 02:39:15 >>>
>>> [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."