You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2005/06/04 17:54:51 UTC

Cocoon zone redirect problems (was: Cocoon zone update)

Le 4 juin 05, à 10:26, Sylvain Wallez a écrit :
> ...Rather than mod_rewrite hacks, we need to ensure samples correctly  
> run when not at the server root. References to CSS, images, etc are  
> absolute and therefore broken when mounted at "/cocoondemo"...

Also, it seems like redirects do not work as expected.

For example (starting with the new links at  
http://cocoon.zones.apache.org/), clicking the "supersonic tour" link  
at

   http://cocoon.zones.apache.org/demos/release/samples/blocks/

sends a redirect to

    
http://cocoon.zones.apache.org/samples/blocks/tour/intro/docs/ 
index.html

but it should be

    
http://cocoon.zones.apache.org/demos/release/samples/blocks/tour/intro/ 
docs/index.html

I haven't investigated the exact cause, it just occured to me an I'm  
running to the Saturday evening picnic now ;-)
-Bertrand



Re: Cocoon zone redirect problems

Posted by Upayavira <uv...@odoko.co.uk>.
Sylvain Wallez wrote:
> Bertrand Delacretaz wrote:
> 
>> Le 4 juin 05, à 10:26, Sylvain Wallez a écrit :
>>
>>> ...Rather than mod_rewrite hacks, we need to ensure samples 
>>> correctly  run when not at the server root. References to CSS, 
>>> images, etc are  absolute and therefore broken when mounted at 
>>> "/cocoondemo"...
>>
>>
>>
>> Also, it seems like redirects do not work as expected.
>>
>> For example (starting with the new links at  
>> http://cocoon.zones.apache.org/), clicking the "supersonic tour" link  at
>>
>>   http://cocoon.zones.apache.org/demos/release/samples/blocks/
>>
>> sends a redirect to
>>
>>    http://cocoon.zones.apache.org/samples/blocks/tour/intro/docs/ 
>> index.html
>>
>> but it should be
>>
>>    
>> http://cocoon.zones.apache.org/demos/release/samples/blocks/tour/intro/ 
>> docs/index.html
>>
>> I haven't investigated the exact cause, it just occured to me an I'm  
>> running to the Saturday evening picnic now ;-)
> 
> 
> 
> Is there a ProxyPassReverse along with the ProxyPass?
> 
> Also, I found it to be generally a bad idea to proxypassing an httpd 
> prefix to a different prefix on the servlet engine, as it often confuses 
> session management because of the JSESSIONID cookie path.

Unless, in jetty you use the feature to set all session paths to / 
(can't remember option off-hand).

Regards Upayavira



Re: Cocoon zone redirect problems

Posted by Sylvain Wallez <sy...@apache.org>.
Bertrand Delacretaz wrote:

> Le 4 juin 05, à 10:26, Sylvain Wallez a écrit :
>
>> ...Rather than mod_rewrite hacks, we need to ensure samples 
>> correctly  run when not at the server root. References to CSS, 
>> images, etc are  absolute and therefore broken when mounted at 
>> "/cocoondemo"...
>
>
> Also, it seems like redirects do not work as expected.
>
> For example (starting with the new links at  
> http://cocoon.zones.apache.org/), clicking the "supersonic tour" link  at
>
>   http://cocoon.zones.apache.org/demos/release/samples/blocks/
>
> sends a redirect to
>
>    http://cocoon.zones.apache.org/samples/blocks/tour/intro/docs/ 
> index.html
>
> but it should be
>
>    
> http://cocoon.zones.apache.org/demos/release/samples/blocks/tour/intro/ 
> docs/index.html
>
> I haven't investigated the exact cause, it just occured to me an I'm  
> running to the Saturday evening picnic now ;-)


Is there a ProxyPassReverse along with the ProxyPass?

Also, I found it to be generally a bad idea to proxypassing an httpd 
prefix to a different prefix on the servlet engine, as it often confuses 
session management because of the JSESSIONID cookie path.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://apache.org/~sylvain            http://anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Re: Cocoon zone redirect problems

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 7 juin 05, à 15:46, Vadim Gritsenko a écrit :
> ...Just edit the damn file in SVN! :-)
>
> -    <Arg>/</Arg>
> +    <Arg><SystemProperty name="context" default="/"/></Arg>

Done in 2.1.x branch and in trunk.

The demo at http://cocoon.zones.apache.org/demos/release/ works 
correctly now (it's still the 2.1.7 release but I have patched this 
manually there), thanks for the info!

-Bertrand

Re: Cocoon zone redirect problems

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Bertrand Delacretaz wrote:
> Le 7 juin 05, à 14:49, Vadim Gritsenko a écrit :
> 
>> Bertrand Delacretaz wrote:
>>
>>> CSS and others links are still broken on the samples, to fix this 
>>> we'll  need either a bunch of ugly mod_rewrite statements,
>>
>>
>> It will be easier to deploy cocoon under same context path, won't it? 
>> Just need to edit tools/jetty/conf/main.xml so that instead of '/' you 
>> can pass some system property.
> 
> 
> Right - I'll see how I can do it while keeping the possiblity of just 
> dumping a new release in place and restarting. A sed script to do this 
> setup in main.xml should do.

Just edit the damn file in SVN! :-)

-    <Arg>/</Arg>
+    <Arg><SystemProperty name="context" default="/"/></Arg>


Vadim

Re: Cocoon zone redirect problems

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 7 juin 05, à 14:49, Vadim Gritsenko a écrit :

> Bertrand Delacretaz wrote:
>> CSS and others links are still broken on the samples, to fix this 
>> we'll  need either a bunch of ugly mod_rewrite statements,
>
> It will be easier to deploy cocoon under same context path, won't it? 
> Just need to edit tools/jetty/conf/main.xml so that instead of '/' you 
> can pass some system property.

Right - I'll see how I can do it while keeping the possiblity of just 
dumping a new release in place and restarting. A sed script to do this 
setup in main.xml should do.

-Bertrand

Re: Cocoon zone redirect problems

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Bertrand Delacretaz wrote:
> CSS and others links are still broken on the samples, to fix this we'll  
> need either a bunch of ugly mod_rewrite statements,

It will be easier to deploy cocoon under same context path, won't it? Just need 
to edit tools/jetty/conf/main.xml so that instead of '/' you can pass some 
system property.

Vadim

Re: Cocoon zone redirect problems (was: Cocoon zone update)

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 4 juin 05, à 17:54, Bertrand Delacretaz a écrit :

> ...Also, it seems like redirects do not work as expected.
>
> For example (starting with the new links at  
> http://cocoon.zones.apache.org/), clicking the "supersonic tour" link  
> at
>
>   http://cocoon.zones.apache.org/demos/release/samples/blocks/
>
> sends a redirect to
>
>    
> http://cocoon.zones.apache.org/samples/blocks/tour/intro/docs/ 
> index.html..

With "ProxyPreserveHost Off" instead of "On" in the httpd.conf,  
redirects seem to work correctly.

Daisy doesn't seem to require this setting, so we'll leave it Off for  
now.

CSS and others links are still broken on the samples, to fix this we'll  
need either a bunch of ugly mod_rewrite statements, or (much better)  
fix them in the samples to use relative links.

-Bertrand