cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ternes, Oliver" <>
Subject Authentication: XSP & Database
Date Thu, 12 Jun 2003 11:32:25 GMT
Hi everyone,

I have problems using the authentication framework and session management. I
read the user documentation thousand times and I tried to modify the Portal
framework to suit my needs, but it doesn't work at all.
Well, I want to create a login using a database. I need to retrieve the
rights connected to a user and his role. I wrote a XSP to get that data, it
looks like this: 

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java" xmlns:xsp=""

      String userName = <xsp-request:get-parameter name="userName" />;
      String userPass = <xsp-request:get-parameter name="userPW" />;
      String userRole = <xsp-request:get-parameter name="userRole" />;
	<ID><esql:get-int column="userID" /></ID>
	<role><xsp-request:get-parameter name="userRole" /></role>
			<xsp:logic>if (
column="rightName"/>.equals("read")) {
				}if (<esql:get-string

I also get the data but how can I transform them into a valid session
object? I adapted my sitemap like it is shown in the cocoon documentation,
but it doesn't work - here's the extract:

    <map:match pattern="login*">
    	<map:act type="auth-loggedIn">
   		<map:parameter name="handler" value="iwkahandler" />
	        	<map:redirect-to uri="projects/index.xml"/>
        	<map:act type="auth-login">
  		<map:parameter name="handler" value="iwkahandler" />
        		<map:parameter name="parameter_userName"
value="{request:userName}" />
        		<map:parameter name="parameter_userPW"
value="{request:userPW}" />
        		<map:parameter name="parameter_userRole"
value="{request:userRole}" />
	        	<map:redirect-to uri="projects/index.xml"/>
        	<map:generate src="login.xml"/>
        	<map:transform src="styles/login-html.xsl"/>
        	<map:transform type="encodeURL"/>

    <map:match pattern="**/logon.xsp">
	    	<map:generate type="serverpages" src="xsp/logon.xsp" />
        		<map:transform type="session"/>
	    	<map:serialize type="xml"/>

I hope you can help me ... 

Some more technical data:
	Win2k SP3, Cocoon 2.1 within the jetty container, Internet Explorer


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message