cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beyaNet Consultancy <beya...@ntlworld.com>
Subject Re: org.apache.avalon.framework.configuration.ConfigurationException: No languages defined!
Date Tue, 20 Apr 2004 10:37:22 GMT
Hi,
just to add that I am using version 2.1.4 of cocoon.

Peter
On 20 Apr 2004, at 11:31, beyaNet Consultancy wrote:

> hi,
> I have added the following lines of code to my sitemap, and am now  
> getting the above mentioned error message:
>
> <map:flow-interpreters default="JavaScript"/>
>
> <map:selector name="exception"  
> src="org.apache.cocoon.selection.XPathExceptionSelector">
> 	<exception name="invalid-continuation"  
> class="org.apache.cocoon.components.flow.InvalidContinuationException"/ 
> >
> 	<exception class="java.lang.Throwable" unroll="true"/>
> </map:selector>
>
> <map:flow language="javascript">
> 	 <map:script src="flow/login.js"/>
> </map:flow>
>
> <map:match pattern="*.jx">
> 	<map:generate type="jx" src="jx/{1}.jx"/>
> 	<map:serialize type="xhtml"/>
> </map:match>
> 			
> <map:match pattern="*.kont">
> 	<map:call continuation="{1}"/>
> </map:match>
>
> <map:match pattern="invalidContinuation">
> 	<map:generate src="exceptions/invalidContinuation.xml"/>
> 	<map:serialize type="xml"/>
> </map:match>
> 			
> <map:handle-errors>
> 	<map:select type="exception">
> 	<map:when test="invalid-continuation">
> 	<map:generate src="exceptions/invalidContinuation.html"/>
> 	<map:serialize type="xhtml"/>
> 	</map:when>
> 	</map:select>
> </map:handle-errors>
>
> What am I missing?
>
> Peter
>
> On 20 Apr 2004, at 10:45, beyaNet Consultancy wrote:
>
>> Hi,
>> ok, so I have been using actions thus far to perform things like  
>> login, and now discover the beauty and simplicity of flowscript. So  
>> why actions? Anyway, I want to convert an action I currently have to  
>> check a users login details to flowscript. So my question is, what do  
>> I need to do? My user class is of the getter and setter variety and  
>> in my sitemap I have the following code to read the user/password  
>> details into the action:
>>
>> 			<map:match pattern="login">
>> 				<map:act type="auth-login">
>> 					<map:parameter name="handler" value="beyarecords"/>
>> 						<map:parameter name="parameter_name"  
>> value="{request-param:user}"/>
>> 							<map:parameter name="parameter_password"  
>> value="{request-param:pass}"/>
>> 								<map:redirect-to uri="registerd_user_area"/>
>> 				</map:act>
>> 				<!-- authentication failed: -->
>> 				<map:redirect-to uri="login.html"/>
>> 			</map:match>
>>
>>
>> I now want to change this code so that it can read the values into a  
>> flowscript, which in turn queries a user object ( User user =  
>> User.getUser(userName, userPassword) ). If the user does not exist i  
>> want the user to be re-directed back to the login page, otherwise  
>> they are re-directed to my protected area:
>>
>> 			<map:match pattern="registerd_user_area">
>> 				<map:act type="auth-protect">
>> 					<map:parameter name="handler" value="beyarecords"/>
>> 						<map:aggregate element="home">
>> 							<map:part src="cocoon:/support/beya-menu"/>
>> 								<map:part src="cocoon:/support/contract-summary"/>
>> 									<map:part  
>> src="context://beyarecords/content/adv-xyz-01.xml"/>
>> 										<map:part src="cocoon:/support/banner"/>
>> 						</map:aggregate>
>> 						
>> 						<map:transform type="xslt" src="style/home-page.xsl"/>
>> 					<map:call resource="serialize"/>
>> 				</map:act>
>> 			</map:match>
>>
>>
>> Of course I appreciate that those parts of my sitemap which used the  
>> map:act type="auth-protect" would now need to be changed to reflect  
>> using a flowscript instead, something like:
>>
>> <map:call function="userLoggedIn"/>??? In the above instance, how  
>> would I still utilise the map:aggregate???
>>
>>
>> Peter
Mime
View raw message