cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Ibanez <>
Subject Problems with Views and redirect-to
Date Mon, 07 Apr 2003 17:58:11 GMT


  I am developing an example of a portal using cocoon. The idea is to use
an application inside another one, in the same way as the given example of
WSProxyGenerator by Cocoon. The application that I am using is the given
example of "authentication-fw". The first change I have made in the
sitemap of this is to add the ability to return xml view. Adding a new
view in the sitemap and a label in the transformer of the pipeline that
match with 'protected'. Here is the example:

   <!-- ========================================= -->
   <!-- Form target which performs auth service   -->
   <!-- ========================================= -->
   <map:match pattern="do-login">
      <!-- try to login -->
      <map:act type="auth-login">
	 <map:parameter name="handler" value="demohandler"/>
         <map:parameter name="parameter_name"
  		<map:redirect-to uri="protected" />
      <!-- something was wrong, try it again -->
      <map:redirect-to uri="login"/>

   <!-- ================ -->
   <!-- Protected area   -->
   <!-- ================ -->
   <map:match pattern="protected">
      <map:act type="auth-protect">
        <map:parameter name="handler" value="demohandler"/>
           <map:generate src="docs/protected.xml"/>
           <map:transform src="stylesheets/simple-page2html.xsl"/>
	   <map:transform type="encodeURL"  label="xml"/>
           <map:serialize />
      <!-- something was wrong, redirect to login page -->
      <map:redirect-to uri="login"/>

The problem comes when I request the 'do-login' but the returned format
that I want is XML. Here is the request:

But the response send back by cocoon is HTML.

I know that cocoon redirects the request to protected area when the
username is valid and this works, but in this redirection the request of
cocoon-view=xml has been losen and responds in HTML format.
Because of that, I can´t use the request above in the wsproxy generator.
It gives an execution error message: Invalid response - no xml.

Does anybody know how to resolve this problem?

Thanks in advanced.

   Felipe Ibáñez Anfurrutia
   Deparment of Computer Languages and Systems
   Computer Engineering Faculty
   University of the Basque Country
   Apdo. 649
   20080 - San Sebastian (Spain)

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

View raw message