cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beyaRecords - The home Urban music <...@beya-records.com>
Subject Re: null pointer error
Date Thu, 08 Jan 2004 19:34:06 GMT
Any takers for this question?
On 8 Jan 2004, at 18:58, beyaRecords - The home Urban music wrote:

> hi,
>
> i am getting a null pointer error when trying to validate a form. I 
> have 2 definition files 1 to validate a login form and the other to 
> validate the user input.
>
> 1 My map actions is as follows:
>
> 		<map:actions>
> 			<map:action name="char-counter" src="test.CharCounterAction"/>
> 			<map:action name="session-validator" 
> src="org.apache.cocoon.acting.SessionValidatorAction" />
> 			<map:action name="session-invalidator" 
> src="org.apache.cocoon.acting.SessionInvalidatorAction" />
> 			<map:action name="authenticator" 
> src="org.apache.cocoon.acting.DatabaseAuthenticatorAction" />
> 			<map:action name="validator" logger="sitemap.Action.validator" 
> src="org.apache.cocoon.acting.FormValidatorAction" />
> 			<map:action name="request" logger="sitemap.Action.request" 
> src="org.apache.cocoon.acting.RequestParamAction" />
> 		</map:actions>
>
> 2. My login definition file is:
>
> <root>
> 	<parameter name="user" typr="string" max-len="20" nullable="no" />
> 	<parameter name="pass" typr="string" max-len="20" nullable="no" />
> 	
> 	<constraint-set name="add">
> 		<validate name="user" />
> 		<validate name="pass" />
> 	</constraint-set>
> </root>
>
> 3. My database definition file is:
>
> <auth-descriptor>
> 	<connection>postgresql</connection>
> 	<table name="usertbl">
> 		<select dbcol="username" request-param="user" to-session="user" />
> 		<select dbcol="userpassword" request-param="pass" 
> to-session="password" />
> 	</table>
> </auth-descriptor>
>
> 4. My pipe is:
>
> 			<map:match pattern="login">
> 				<map:act type="validator">
> 				<map:parameter name="descriptor" 
> value="context://beyarecords/content/def/login-def.xml"/>
> 				<map:parameter name="validate-set" value="add" />
> 				
> 					<map:act type="authenticator">
> 					<!-- Ok, login details are being checked. If they exist we get 
> logged into system -->
> 						<map:parameter name="descriptor" 
> value="context://beyarecords/content/def/auth-def.xml"/>
> 						<map:redirect-to uri="support/home"/>
> 					</map:act>
> 					
> 				</map:act>
> 				
> 				<!-- if not we get redirected back to the login page -->
> 				<map:redirect-to uri="login.html" />
> 			</map:match>
>
> 5. And my html form is:
>
> 		<form action="login" method="post">
> 		
> 			<table>
> 			<tr>
> 				<td align="right">User:</td>
> 				<td align="left"><input type="text" name="user" /></td>
> 			</tr>
> 			<tr>
> 				<td align="right">Password:</td>
> 				<td align="left"><input type="text" name="pass" /></td>
> 			</tr>
> 			<tr>
> 				<td colspan="2" align="center"><input type="submit" value="login" 
> /></td>
> 			</tr>
> 			</table>
> 		</form>
>
> What am I doing wrong here?
>
> regards
>
>
> Uzo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message