Thanks a lot for your help Matthew, that seems just what I need... Robin
on 6/3/02 1:50 pm, Matthew Langham at [EMAIL PROTECTED] wrote: > All this is already there :-). Ok, it is not yet in a released version of > Cocoon - but easy enough to get hold of. > > Check out the scratchpad and dive into the sunrise/sunshine authentication > components etc. that we committed a couple of weeks ago. > > Check out my tutorial on authentication here: > http://www.need-a-cake.com/stories/2002/02/28/usingTheSunriseComponents.html > > And this document "sunshine-contexts.xml" in the scratchpad. This shows you > how to store and retrieve data in a session context as xml etc. > > Best regards > > Matthew > > -- > Open Source Group sunShine - Lighting up e:Business > ================================================================= > Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn > Tel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de > Weblogging at: http://www.need-a-cake.com > ================================================================= > > > > > -----Original Message----- > From: yuryx [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, March 06, 2002 2:25 PM > To: [EMAIL PROTECTED] > Subject: Re: Saving/Retrieving Session or Request parameters in sitemap > > > Robin Wyles wrote: > >> Hi All... >> >> I am new to Cocoon 2 and am currently prototyping a login/authentication >> routine. I am using SessionIsValidAction to check if the user is logged in, >> and if this fails they are redirected to the login page, the >> DatabaseAuthenticatorAction is then used to check the user's submitted > login >> details against values stored in a database. This all works great. >> >> Now I would like to be able to save the original request URI before the >> SessionIsValidAction is called so I can then re-direct the user to when the >> DatabaseAuthenticatorAction is successful. Here are the pipeline fragments >> that control this: >> >> <!-- Check if user is logged in --> >> <map:match pattern="app/*.xml*"> >> <map:act type="session-isvalid"> >> <!-- user is logged in --> >> <map:generate type="file" src="app/{../1}.xml" /> >> <map:transform src="app/default.xsl" /> >> <map:serialize /> >> </map:act> >> <!-- use is not logged in - redirect to login --> >> <map:generate type="file" src="app/login.xml" /> >> <map:transform src="app/default.xsl" /> >> <map:serialize /> >> </map:match> >> >> <!-- Do login --> >> <map:match pattern="app/sign-in*"> >> <map:act set="checkUser"> >> <map:parameter name="descriptor" >> value="app/users_descriptor.xml" /> >> <!-- Re-direct to original requestURI here --> >> </map:act> >> <!-- User cannot be authenticated - back to login --> >> <map:generate type="file" src="app/login.xml" /> >> <map:transform src="app/default.xsl" /> >> <map:serialize /> >> </map:match> >> >> Can I do this using the default set of actions that come with Cocoon 2? I >> know that I can set a session attribute using the sessionPropagatorAction, >> but how do I read it again? I also know I can read a request parameter > using >> the RequestParamAction but how do I set a request parameter? >> >> I would like to do this within the sitemap rather than resorting to XSP if >> possible. >> >> Thanks in advance, >> >> Robin Wyles >> >> >> --------------------------------------------------------------------- >> Please check that your question has not already been answered in the >> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> >> >> To unsubscribe, e-mail: <[EMAIL PROTECTED]> >> For additional commands, e-mail: <[EMAIL PROTECTED]> >> > > see http://java.sun.com/products/servlet/2.2/javadoc/ and > http://xml.apache.org/cocoon/apidocs/index.html > > Regards. > Yury. > > > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>