cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject RE: redirection in XSP?
Date Thu, 20 Feb 2003 12:56:53 GMT
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.

>>> Alban.Tsui@COGNOS.com 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:DHohls@csir.co.za] 
Sent: 20 February 2003 10:56
To: cocoon-users@xml.apache.org 
Subject: Re: redirection in XSP?


Alban
 
Look at:
http://wiki.cocoondev.org/Wiki.jsp?page=Redirecting 
 
Derek

>>> Alban.Tsui@COGNOS.com 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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>



-- 
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."


Mime
View raw message