On Mon, 2008-06-02 at 03:01 -0700, jazzhazze wrote: > Thanks for the reply. > I would like to implement this jsp-page (or at least a modification of it) > to solve my "old problem" with the authentication to certain pages of my > intranet-site. I want to use the url that is passed as a key to grant access > to certain pages of my publication.
As I understand it you are trying to "just" set some request headers, right? To load a page before a page is NOT what you are not want nor should do in any apps. You problem can be solved best as an Action. http://cocoon.apache.org/2.1/userdocs/concepts/actions.html Use the action from http://cocoon.apache.org/2.1/userdocs/concepts/actions.html#Creating+the +Action as basis and add your code there. The part you need is setting the request headers and if auth fails the action should return null otherwise a empty map (not null !!!). Then in your pub sitemap it would be something like: <map:match pattern="**"> <map:act type="AuthAction"> <map:generate src="{1}"/> <map:serialize/> </map:act> <map:generate src="SomeErrorPage"/> <map:serialize/> </map:match> If you return an empty map (not null) the code inside the action is used and if you return null the other part. In any case I personally would implement this with Apache http and the mod_auth (and a like). http://httpd.apache.org/docs/2.0/mod/mod_auth.html HTH salu2 -- Thorsten Scherler thorsten.at.apache.org Open Source Java consulting, training and solutions --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
