RE: redirection in XSP?
I'd seen that before but didn't realize it was setting sitemap parameters. Thank you Tim. Wayne -Original Message- From: Timothy Larson [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 4:16 PM To: [EMAIL PROTECTED] Subject: RE: redirection in XSP? See: http://wiki.cocoondev.org/Wiki.jsp?page=XSPAction It provides two ways to set a sitemap parameter (there are other ways as well :) The static way (you could wrap this in a java if): action:set-result name=parameter-name value=parameter-value/ Example: action:set-result name=uri value=uri-to-redirect-to/ The dynamic way: action:set-result action:param name=namexsp:exprgetName()/xsp:expr/action:param action:param name=valuexsp:exprgetValue()/xsp:expr/action:param /action:set-result Example: action:set-result action:param name=nameuri/action:param action:param name=valuexsp:exprname-of-java-string-holding-uri-to-redirect-to/xsp:e xpr/action:param /action:set-result Tim [EMAIL PROTECTED] 02/20/03 03:53PM Excellent. Thank you. Now, to push my luck, where is documentation on how to set a sitemap paramter in an XSP? Do you use xsp:logicsitemapParams.put(param_name, param_value)/xsp:logic? Is there an xsp logicsheet tag for setting sitemap parameters? Wayne -Original Message- From: Timothy Larson [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 12:09 PM To: [EMAIL PROTECTED] Subject: RE: redirection in XSP? Sorry for the typo, should be: Have the XSP-Action set a sitemap parameter, such as uri, and then have this in your sitemap: map:act src=somepage.xsp type=xsp-action map:redirect-to uri={uri}/ /map:act Tim [EMAIL PROTECTED] 02/20/03 10:48AM 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 - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: redirection in XSP?
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 AMTo: [EMAIL PROTECTED]Subject: RE: redirection in XSP? 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 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:56To: [EMAIL PROTECTED]Subject: Re: redirection in XSP? Alban Look at: http://wiki.cocoondev.org/Wiki.jsp?page=Redirecting Derek [EMAIL PROTECTED] 20/02/2003 12:14:01 HiI want to write a couple of XSP pages. The first one would read the requestparameters and continue if the parameters satisfy some conditions but ifthey don't I want it to redirect the processing to another XSP. Is thispossible?Currently the above process is done by jsp pages... and using something likewithin the jsp: response.sendRedirect(requestURI);AlbanThis message may contain privileged and/or confidential information. If youhave received this e-mail in error or are not the intended recipient, youmay not use, copy, disseminate or distribute it; do not open anyattachments, delete it immediately from your system and notify the senderpromptly by e-mail that you have done so. Thank you.-Please check that your question has not already been answered in theFAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlTo 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
RE: redirection in XSP?
Excellent. Thank you. Now, to push my luck, where is documentation on how to set a sitemap paramter in an XSP? Do you use xsp:logicsitemapParams.put(param_name, param_value)/xsp:logic? Is there an xsp logicsheet tag for setting sitemap parameters? Wayne -Original Message- From: Timothy Larson [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 12:09 PM To: [EMAIL PROTECTED] Subject: RE: redirection in XSP? Sorry for the typo, should be: Have the XSP-Action set a sitemap parameter, such as uri, and then have this in your sitemap: map:act src=somepage.xsp type=xsp-action map:redirect-to uri={uri}/ /map:act Tim [EMAIL PROTECTED] 02/20/03 10:48AM 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 - 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]
RE: sitemap flow based on requestor's URL?
That sounds like it could work; and is a very powerful technique in general. Thanks Wayne -Original Message- From: Timothy Larson [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 02, 2003 3:05 PM To: [EMAIL PROTECTED] Subject: Re: sitemap flow based on requestor's URL? You could make your XSP into an action: http://wiki.cocoondev.org/Wiki.jsp?page=XSPAction Then you could use the action's indication of success or failure to redirect to different places: map:match pattern=*.html map:act type=xsp-action src=some.xsp map:redirect-to uri=some-place.html/ /map:act map:redirect-to uri=other-place.html/ /map:match Tim [EMAIL PROTECTED] 01/02/03 02:42PM I want to direct flow through the sitemap based on whether the requestor is inside or outside my firewall. Everyone external to the firewall will appear to cocoon to have the same URL. I need external visitors to be directed to a login page. Internal visitors should be automatically assigned a session object so they dont have to login and can directly access protected area of the sitemap. I'd like to be able to do this using sitemap logic but the only way I find to get access to the requestor's URL is with xsp:get-remote-address. If I must use an xsp page for this, I can test the URL and create a session if it's an internal URL. but then I would need to follow this up with a redirect to the protected area. any suggestions for an approach to the solution greatly appreciated. Wayne Wayne Brandes, DO MPH Director of Healthcare Informatics American Institutes for Research Prospect Center 10720 Columbia Pike Silver Spring, MD 20901 [EMAIL PROTECTED] - 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]
sitemap flow based on requestor's URL?
Title: Re: xsp:attribute generating a new element instead of an attribute in an already existing element I want to direct flow through the sitemap based on whether the requestor is inside or outside my firewall. Everyone external to the firewall will appear to cocoon to have the same URL. I need external visitors to be directed to a login page. Internal visitors should be automatically assigned a session object so they dont have to login and can directly access protected area of the sitemap. I'd like to be able to do this using sitemap logic but the only way I find to get access to the requestor's URL is with xsp:get-remote-address. If I must use an xsp page for this, I can test the URL and create a session if it's an internal URL. but then I would need to follow this up with a redirect to the protected area. any suggestions for an approach to the solution greatly appreciated. Wayne Wayne Brandes, DO MPH Director of Healthcare Informatics American Institutes for Research Prospect Center 10720 Columbia Pike Silver Spring, MD 20901 Wbrandes@air.org
RE: sunRise User Administration for Dummies
Thank you Matthew I've read it adn it seemed fairly understandable, sort of, except for the chapter on The authentication resource, which introduces this syntax: authentication uri=cocoon:raw://authenticationresource/ without explaining what raw is about, and give a practical example of how to actually utilize an authentication resource. cocoon:raw:// is an extension to the cocoon: protocol allowing you to decide whether you want any request parameters passed into the new pipeline you are calling. If you add :raw then no request parameters are passed. Anyone have an example of how to use MySQl as the authentication resource? An authentication is just a normal pipeline. So you could look at the example pipeline (which authenticates against a file) and then change that to add the sql transformer etc. Matthew -Original Message- From: Brandes, Wayne [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 2:05 PM To: 'Matthew Langham ' Subject: RE: sunRise User Administration for Dummies I've read it adn it seemed fairly understandable, sort of, except for the chapter on The authentication resource, which introduces this syntax: authentication uri=cocoon:raw://authenticationresource/ without explaining what raw is about, and give a practical example of how to actually utilize an authentication resource. Anyone have an example of how to use MySQl as the authentication resource? W -Original Message- From: Matthew Langham To: [EMAIL PROTECTED] Sent: 10/14/2002 2:36 AM Subject: RE: sunRise User Administration for Dummies Have you guys read the documentation? The authentication framework is explained in detail here: http://xml.apache.org/cocoon/developing/webapps/index.html Let me know if you have any additional questions. Matthew -- Open Source Group Cocoon { Consulting, Training, Projects } = Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 Paderborn Tel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de - Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20 = -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, October 12, 2002 3:07 AM To: [EMAIL PROTECTED] Subject: Re: sunRise User Administration for Dummies I've looked at the user admin and the authentication in general. (not the sunrise scratchpad but what's now in the main branch). As best as I can figure there's a generator that works with the AuthenticationManager to create an interactive page to get users, a user, roles, a role, create a user, create a role, update a user, delete a user, delete a role. These simply call the various corresponding resources that you set up with the sitemap.xml (authentication manager section within the components). As far as I can tell nothing is really done with them apart from what you do in the resource. so the UI really calls the resource that you configured and you do something with it. Whatever occurs is not automagically used within Cocoon's authentication. Hypersonic appears to only be used for sample applications not for authentication. so no users, roles or the association between the two is stored. I've found absolutely no JDBC code within the authenication/session pieces. My reason for looking into this was from a scalability point of view. I like Hypersonic DB for prototyping but not for serious production code. So i was trying to make sure this wasn't being used at all for authenication. The usage of resources allows you to use your own persistence mechanism, e.g. LDAP, database, XML file, etc. Also I was looking at the session management. My gripe is that it uses HttpSession and didn't make use of calling out to resources as the authentication manager did. If the user wanted to use HttpSession or the database or... let them do that in the called resource. So ideally there's a getProperties and a saveProperties resource (oh well). Also the roles is really confusing, as within the authentication manager it's not used at all as far as I can tell (it's probably used in the portal). There's a roleFilterTransformer that goes off of the J2EE role that you'd set for the web.xml and use the isUserInRole method. That's all the transformer does. it doesn't actually use the role from the authentication manager??? so these are unrelated pieces of code. So the role information that you return from the authenication resource appears to be left to the developer to make use of somehow, assuming they're not using Cocoon's portal offering. I'm fairly certain the portal uses the role but I've not looked at the portal component at all. hope that helps. md At 19:57 11/10/2002 -0800, you wrote: Hi Guys, Can anybody give me anything... I really don't have any clear idea on how
How to serve zip file from Cocoon?
I am unable to serve zip files from my Cocoon. Using Cocoon 2.0.3, Tomcat 4.0.4, JDK 1.3.1, on a Win2K box. Generally working well; I am able to dynamically generate pages from a mysql database, serve up gif files and Word files, etc However I want users to be able to download a zip file from my server, but it is not working. I have a pipeline that correctly matches the url request, and contains the line: map:read mime-type=application/zip src=documents/mydocument.zip / When the url is called a file download dialog box opens in my broswer with three filenames: documents, documents.zip, and IP_Agent.exe. There are no files with these names in my actual documents folder. I know a call to the url causes the sitemap to look at the documents/mydocument.zip file because if I change the name of the file in the sitemap (e.g., to mydocuments.zi) I get a no such path cocoon error when the url is called. I have done a mime-mapping of zip with application/zip in web.xml, to no avail. I have searched the FAQ and mail list archives and don't find an answer. Any help greatly appreciated Wayne Brandes - 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]