You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Maria Jesus Turiel <ma...@silicetelecom.com> on 2009/04/17 14:31:37 UTC

web.xml in ProxyPass

Hi,

I'm using jetty with apache httpd in my project, but it seems to lose
the session (I've some variables mapped in sitemap.xmap as
<map:parameter name='myvar' value='{user-attr:myvar}'/>)

When I work whith the server IP direct (i.e.: 192.160.100.233) I've no
problem, but If I work with a domain (i.e.: www.myexample.com) I loss
the value of that variable

I've read that in web.xml:

<!-- Context Configuration ==========================================
-->

  <!--+
      | Set a context property useful to allow you to ProxyPass your
      | web application mounted to a different URI without loosing the
      | ability to do cookie-based sessions.
      | WARNING: this is Jetty specific!
      +-->
  <!--context-param>
    <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
    <param-value>/some/path/to/your/webapp</param-value>
    <description>An override of the session cookie path</description>
   </context-param-->

  <!-- Servlet Configuration ==========================================
-->

But, I don't understand what exactly I have to put instead of
'/some/path/to/your/webapp' I've tried to replace by
'/usr/local/lenya/build/lenya/webapp/' but it doesn't work


Many thanks in advance

-- 
María Jesús Turiel Martínez
Dpto. Desarrollo
Silice Tecnología y Servicios
Empresa Certificada ITMark
Telf. 902 888 264


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Tue, 2009-05-05 at 00:05 -0700, Frank Hamilton wrote:
> 
> 
> Maria Jesus Turiel wrote:
> > 
> > Hi,
> > 
> > We've not yet this problem. It's not sure about the reason.
> > 
> > We found that the process htcleancache doesn't stop when whe stop apache
> > in that server. 
> > 
> > After to kill all repeated htcleancache process and stop and starts
> > Apache2 and to verify there are an unique process htcleancache, it works
> > fine.
> > 
> > Thank you very much
> > 
> > 
> 
> Hi, 
> this problem is still in our system, Maria Jesus and me thought that this
> solve but no.
> We used the org.apache.cocoon.environment.Session to put a user object when
> a user login in the aplication.

hmm, you later tell that you clean the cookies but AFAIR
org.apache.cocoon.environment.Session is not saved within a cookie.
However since the cleaning of the cache has solved partly the problem it
sounds really like a caching problem. 

> Then we used  XPathMetaModule to get user.name in our pipeline and print the
> name in the presentation layer.

Did you try to save the user.name directly in a cookie?

> 
> If we don't use the apache2  this run Ok but when use apache with mod_cache,
> mod_proxy and mod_rewrite the server give us a response with a set-cookie in
> headers and some times the name of other user appear in the session of a
> user.
> We think that the problem is that mod_cache is caching http headers with
> cookies and after server this pages with this cookies to someone. Studing
> apache2 in more detail found that we can use CacheIgnoreHeaders set-Cookie
> directive to avoid the cache save the cookie but this seem not work in the
> version 2.2.11 of apache2( or maybe we don know how use it).
> This is the code for our virtual host:

Did you ask as well on users@httpd.apache.org they may have some more
tips.

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Tue, 2009-05-05 at 04:45 -0700, Frank Hamilton wrote:
...
> > Would you mind giving some more information on how you want to achieve 
> > the combination of caching and personalization using the servlet 
> > session? TIA!
> > ...
> Thaks Thor and Andreas,
> The problem is sure from cache, if desactive cache, all its Ok.
> Now We try to put the meta tag,
>                        <META Http-Equiv="Cache-Control" Content="no-cache"
> />
> 			<META Http-Equiv="Pragma" Content="no-cache" />
> 			<META Http-Equiv="Expires" Content="0" />
> only if there is a user in cocoon enviroment session. With this we sure that
> the page specialized are not caching.
> But Maybe a register user recived a cache page without his correct user
> cookie. Maybe we need that when a register user is detected, cache not work
> for his request. But we not idea how to do that.
> 
> In other hand, we detected that the perfermance without cache is good too.
> Temporary this is our solution.
> 
> Any idea to solve that problem.

To have a mix from cached and un-cached pages I recommend a url prefix
to trigger the behavior. Like www.turismoextremadura.com is cached but
www.turismoextremadura.com/user/* would not be. Would open another line
of problems though.

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Frank Hamilton <ii...@hotmail.com>.
Thank very much, again. For me it very important your help.

Well, now I use a cookie for maintain the user name in session. And use ssl
connection when this cookie is found. Thank for this idea.

Now my apache virtual host config is :

<VirtualHost *:80>
       
        .....

        CacheRoot /var/cache/apache2/mod_disk_cache
	CacheEnable disk /
        CacheDirLevels 5
        CacheDirLength 3
        #CacheIgnoreHeaders Set-Cookie
        
        ProxyRequests Off
        RewriteEngine On
        
        #Debug en dev
        RewriteLogLevel 3 
        RewriteLog /var/cache/apache2/rewrite.log
      
    	#En caso de encontrar la cookie usuario redirigimos a un entorno ssl.
	RewriteCond %{http_cookie} usuario=([^;]+)
	RewriteRule ^(.*) https://www.turismopaco.com/PINTUREX/live/index.html 

 .....

</VirtualHost>
<VirtualHost *:443>
    
   ....

    SSLEngine On
    SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile /etc/apache2/ssl/cert-file.crt

    ProxyRequests Off
    RewriteEngine On
    RewriteLog /var/cache/apache2/rewrite.log
    RewriteLogLevel 3

  
    #En caso de encontrar la cookie usuario redirigimos a un entorno ssl.
    RewriteCond %{http_cookie} !usuario=([^;]+)
    RewriteRule ^(.*) http://www.turismopaco.com/PINTUREX/live/index.html 

   ....
    
    #SSL workaround for MSIE
    BrowserMatch ".*MSIE.*" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0


    ErrorLog   /var/cache/apache2/cms.example.com-error_log
    CustomLog  /var/cache/apache2/cms.example.com-access_log common

</VirtualHost>

All more o less fine with this configuration.
Now I will delete the cache and probe the result.

One more question, I create the SSL-certificate-file with make-ssl-cert form
ssl-cert package, It's valid file for my producction site? Or we need buy a
file?

TIA.


-- 
View this message in context: http://www.nabble.com/web.xml-in-ProxyPass-tp23096663p23422405.html
Sent from the Lenya - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Wed, 2009-05-06 at 10:51 +0200, Andreas Hartmann wrote:
> Hi Frank,
...
> One way is to handle all requests of logged-in users via a different 
> virtual host with no caching enabled, probably using https on the same 
> domain. This can be done using mod_rewrite matching a cookie:
> 
>      RewriteCond %{http_cookie} mycookie=([^;]+)
>      RewriteRule ^(.*) https://…

Yeah that would be the cleanest way to mix them both. 

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Andreas Hartmann <an...@apache.org>.
Hi Frank,

Frank Hamilton schrieb:

[…]

> The problem is sure from cache, if desactive cache, all its Ok.
> Now We try to put the meta tag,
>                        <META Http-Equiv="Cache-Control" Content="no-cache"
> />
> 			<META Http-Equiv="Pragma" Content="no-cache" />
> 			<META Http-Equiv="Expires" Content="0" />
> only if there is a user in cocoon enviroment session. With this we sure that
> the page specialized are not caching.

as you already noticed, this won't help, since the page will be 
delivered from the cache to the logged-in user. You can't switch on/off 
caching for a single page.

> But Maybe a register user recived a cache page without his correct user
> cookie. Maybe we need that when a register user is detected, cache not work
> for his request. But we not idea how to do that.

One way is to handle all requests of logged-in users via a different 
virtual host with no caching enabled, probably using https on the same 
domain. This can be done using mod_rewrite matching a cookie:

     RewriteCond %{http_cookie} mycookie=([^;]+)
     RewriteRule ^(.*) https://…


-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Frank Hamilton <ii...@hotmail.com>.
Hello again,
my problem it not solve and I think to use ac module to mantein user in
session. But my question is,  if I use access module and mod_cache, my
problem disappear or the cache will send another jsessionid who change the
user.
TIA.
-- 
View this message in context: http://www.nabble.com/web.xml-in-ProxyPass-tp23096663p23402082.html
Sent from the Lenya - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Frank Hamilton <ii...@hotmail.com>.


Andreas Hartmann wrote:
> 
> Hi Frank,
> just for my understanding: You are caching personalized pages? I guess 
> I'm missing something, but from a naive point of view, it looks like this:
> 
> * User A requests an expired page. The name A is inserted, and this 
> version is cached.
> * Now user B requests the same page. The cached version, including the 
> name A, is delivered. So B retrieves a page containing A's name.
> 
> If you cache personalized pages, you have to make sure that the person 
> (or session) identifier is included in the cache key. In most cases this 
> renders the caching useless, though, because of an explosion of the key 
> space and a reduction of cache key collisions.
> 
> Using the directive "CacheIgnoreHeaders Set-Cookie" you avoid that the 
> jsessionid cookie is ever sent to the client as part of a cached page, 
> so the session is lost immediately. Actually this makes perfect sense in 
> a cached, non-personalized environment (I use the same setting), but you 
> can't combine this directive with (servlet session based) personalization.
> 
> Would you mind giving some more information on how you want to achieve 
> the combination of caching and personalization using the servlet 
> session? TIA!
> 
> Andreas Hartmann, CTO
> BeCompany GmbH
> http://www.becompany.ch
> Tel.: +41 (0) 43 818 57 01
> 
> 
 
Thaks Thor and Andreas,
The problem is sure from cache, if desactive cache, all its Ok.
Now We try to put the meta tag,
                       <META Http-Equiv="Cache-Control" Content="no-cache"
/>
			<META Http-Equiv="Pragma" Content="no-cache" />
			<META Http-Equiv="Expires" Content="0" />
only if there is a user in cocoon enviroment session. With this we sure that
the page specialized are not caching.
But Maybe a register user recived a cache page without his correct user
cookie. Maybe we need that when a register user is detected, cache not work
for his request. But we not idea how to do that.

In other hand, we detected that the perfermance without cache is good too.
Temporary this is our solution.

Any idea to solve that problem.
TIA.



-- 
View this message in context: http://www.nabble.com/web.xml-in-ProxyPass-tp23096663p23385836.html
Sent from the Lenya - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Andreas Hartmann <an...@apache.org>.
Hi Frank,

Frank Hamilton schrieb:

[…]

> this problem is still in our system, Maria Jesus and me thought that this
> solve but no.
> We used the org.apache.cocoon.environment.Session to put a user object when
> a user login in the aplication.
> Then we used  XPathMetaModule to get user.name in our pipeline and print the
> name in the presentation layer.
> 
> If we don't use the apache2  this run Ok but when use apache with mod_cache,
> mod_proxy and mod_rewrite the server give us a response with a set-cookie in
> headers and some times the name of other user appear in the session of a
> user.
> We think that the problem is that mod_cache is caching http headers with
> cookies and after server this pages with this cookies to someone. Studing
> apache2 in more detail found that we can use CacheIgnoreHeaders set-Cookie
> directive to avoid the cache save the cookie but this seem not work in the
> version 2.2.11 of apache2( or maybe we don know how use it).

just for my understanding: You are caching personalized pages? I guess 
I'm missing something, but from a naive point of view, it looks like this:

* User A requests an expired page. The name A is inserted, and this 
version is cached.
* Now user B requests the same page. The cached version, including the 
name A, is delivered. So B retrieves a page containing A's name.

If you cache personalized pages, you have to make sure that the person 
(or session) identifier is included in the cache key. In most cases this 
renders the caching useless, though, because of an explosion of the key 
space and a reduction of cache key collisions.

Using the directive "CacheIgnoreHeaders Set-Cookie" you avoid that the 
jsessionid cookie is ever sent to the client as part of a cached page, 
so the session is lost immediately. Actually this makes perfect sense in 
a cached, non-personalized environment (I use the same setting), but you 
can't combine this directive with (servlet session based) personalization.

Would you mind giving some more information on how you want to achieve 
the combination of caching and personalization using the servlet 
session? TIA!

-- Andreas


> This is the code for our virtual host:
> 
> <VirtualHost *:80>
>        #solo si el sitio requiere autentificacion
>         ServerAdmin webmaster@www.turismopaco.com
>         ServerName www.turismopaco.com
>         ServerAlias lenya
> 
>         CacheRoot /var/cache/apache2/mod_disk_cache
>         CacheEnable disk /
>         CacheDirLevels 5
>         CacheDirLength 3
>         CacheIgnoreHeaders Set-Cookie
> 
>         ProxyRequests Off
>         RewriteEngine On
> 
>         #Debug en dev
>         RewriteLogLevel 3
>         RewriteLog "/var/cache/apache2/rewrite.log"
> 
>         #Directorio exporta para videos, descargas,...
>         RewriteRule ^/export/.*$ /home/paco/pinturex/export/$1
> 
>         # Se mapean las partes que no son especificas de la publicacion
>         RewriteRule ^/lenya/(.*) http://www.turismopaco.com:8888/lenya/$1
> [P,L]
>         RewriteRule ^/modules/(.*)
> http://www.turismopaco.com:8888/modules/$1 [P,L]
>         RewriteRule ^/PINTUREX/modules/(.*)
> http://www.turismopaco.com:8888/PINTUREX/modules/$1 [P,L]
>         RewriteRule ^/PINTUREX/resources/(.*)
> http://www.turismopaco.com:8888/PINTUREX/resources/$1 [P,L]
>         #Se realiza un mapeo especifico a la zona de galeria de imagenes
> (exclusivamente)
>         RewriteRule ^/PINTUREX/authoring/galeriaimagenes/(.*)
> http://www.turismopaco.com:8888/PINTUREX/authoring/galeriaimagenes/$1 [P,L]
> 
>         # Se mapea el entorno live
>         RewriteRule ^/([^/\.]+)$ $1/ [R]
>         RewriteRule ^/PINTUREX/live/(.*)
> http://www.turismopaco.com:8888/PINTUREX/live/$1 [P,L]
>         RewriteRule ^/captcha\.jpg
> http://www.turismopaco.com:8888/captcha.jpg [P,L]
>         RewriteRule ^/(.*) http://www.turismopaco.com:8888/PINTUREX/live/$1
> [P,L]
>         ProxyPassReverse / http://www.turismopaco.com:8888/PINTUREX/live/
> </VirtualHost>
> 
> 
> Our page in production is www.turismoextremadura.com, if use tamper data you
> can see that the response headers have a set-cookie parameter and this is
> send to the client which change his jSession and for this the user object in
> the org.apache.cocoon.environment.Session is lost.
> 
> Any idea what happened!
> TIA!
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Frank Hamilton <ii...@hotmail.com>.


Maria Jesus Turiel wrote:
> 
> Hi,
> 
> We've not yet this problem. It's not sure about the reason.
> 
> We found that the process htcleancache doesn't stop when whe stop apache
> in that server. 
> 
> After to kill all repeated htcleancache process and stop and starts
> Apache2 and to verify there are an unique process htcleancache, it works
> fine.
> 
> Thank you very much
> 
> 

Hi, 
this problem is still in our system, Maria Jesus and me thought that this
solve but no.
We used the org.apache.cocoon.environment.Session to put a user object when
a user login in the aplication.
Then we used  XPathMetaModule to get user.name in our pipeline and print the
name in the presentation layer.

If we don't use the apache2  this run Ok but when use apache with mod_cache,
mod_proxy and mod_rewrite the server give us a response with a set-cookie in
headers and some times the name of other user appear in the session of a
user.
We think that the problem is that mod_cache is caching http headers with
cookies and after server this pages with this cookies to someone. Studing
apache2 in more detail found that we can use CacheIgnoreHeaders set-Cookie
directive to avoid the cache save the cookie but this seem not work in the
version 2.2.11 of apache2( or maybe we don know how use it).
This is the code for our virtual host:

<VirtualHost *:80>
       #solo si el sitio requiere autentificacion
        ServerAdmin webmaster@www.turismopaco.com
        ServerName www.turismopaco.com
        ServerAlias lenya

        CacheRoot /var/cache/apache2/mod_disk_cache
        CacheEnable disk /
        CacheDirLevels 5
        CacheDirLength 3
        CacheIgnoreHeaders Set-Cookie

        ProxyRequests Off
        RewriteEngine On

        #Debug en dev
        RewriteLogLevel 3
        RewriteLog "/var/cache/apache2/rewrite.log"

        #Directorio exporta para videos, descargas,...
        RewriteRule ^/export/.*$ /home/paco/pinturex/export/$1

        # Se mapean las partes que no son especificas de la publicacion
        RewriteRule ^/lenya/(.*) http://www.turismopaco.com:8888/lenya/$1
[P,L]
        RewriteRule ^/modules/(.*)
http://www.turismopaco.com:8888/modules/$1 [P,L]
        RewriteRule ^/PINTUREX/modules/(.*)
http://www.turismopaco.com:8888/PINTUREX/modules/$1 [P,L]
        RewriteRule ^/PINTUREX/resources/(.*)
http://www.turismopaco.com:8888/PINTUREX/resources/$1 [P,L]
        #Se realiza un mapeo especifico a la zona de galeria de imagenes
(exclusivamente)
        RewriteRule ^/PINTUREX/authoring/galeriaimagenes/(.*)
http://www.turismopaco.com:8888/PINTUREX/authoring/galeriaimagenes/$1 [P,L]

        # Se mapea el entorno live
        RewriteRule ^/([^/\.]+)$ $1/ [R]
        RewriteRule ^/PINTUREX/live/(.*)
http://www.turismopaco.com:8888/PINTUREX/live/$1 [P,L]
        RewriteRule ^/captcha\.jpg
http://www.turismopaco.com:8888/captcha.jpg [P,L]
        RewriteRule ^/(.*) http://www.turismopaco.com:8888/PINTUREX/live/$1
[P,L]
        ProxyPassReverse / http://www.turismopaco.com:8888/PINTUREX/live/
</VirtualHost>


Our page in production is www.turismoextremadura.com, if use tamper data you
can see that the response headers have a set-cookie parameter and this is
send to the client which change his jSession and for this the user object in
the org.apache.cocoon.environment.Session is lost.

Any idea what happened!
TIA!










-- 
View this message in context: http://www.nabble.com/web.xml-in-ProxyPass-tp23096663p23382128.html
Sent from the Lenya - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Maria Jesus Turiel <ma...@silicetelecom.com>.
Hi,

We've not yet this problem. It's not sure about the reason.

We found that the process htcleancache doesn't stop when whe stop apache
in that server. 

After to kill all repeated htcleancache process and stop and starts
Apache2 and to verify there are an unique process htcleancache, it works
fine.

Thank you very much

El vie, 17-04-2009 a las 15:22 +0200, Andreas Hartmann escribió:
> Maria Jesus Turiel schrieb:
> > Then, I don't need use the context-param
> > 
> > Any idea why I lose the session?
> 
> Maybe there's something in your HTTPD configuration which filters the 
> cookie headers? Have you examined the cookies in your browser and the 
> Set-Cookie headers in the HTTP traffic?
> 
> Is your application accessible via the internet, so that we might take a 
> look at it?
> 
> -- Andreas
> 
> 
> > 
> > Thank you very much
> > 
> > El vie, 17-04-2009 a las 14:39 +0200, Andreas Hartmann escribió:
> >> Hi Maria Jesus,
> >>
> >> Maria Jesus Turiel schrieb:
> >>
> >> […]
> >>
> >>>   <!--context-param>
> >>>     <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
> >>>     <param-value>/some/path/to/your/webapp</param-value>
> >>>     <description>An override of the session cookie path</description>
> >>>    </context-param-->
> >>>
> >>>   <!-- Servlet Configuration ==========================================
> >>> -->
> >>>
> >>> But, I don't understand what exactly I have to put instead of
> >>> '/some/path/to/your/webapp' I've tried to replace by
> >>> '/usr/local/lenya/build/lenya/webapp/' but it doesn't work
> >> this is the context path for which the cookie shall be valid. You can 
> >> use the parameter to tell Jetty which path to use for cookies if the 
> >> servlet context differs from the context where the web application is 
> >> visible via the proxy.
> >>
> >> E.g., if your Lenya application is visible at
> >>
> >>    http://www.myexample.com/cms/
> >>
> >> you have to set the parameter to "/cms":
> >>
> >>    <param-value>/cms</param-value>
> >>
> >> HTH,
> >>
> >> -- Andreas
> >>
> >>
> 
> 
-- 
María Jesús Turiel Martínez
Dpto. Desarrollo
Silice Tecnología y Servicios
Empresa Certificada ITMark
Telf. 902 888 264


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Andreas Hartmann <an...@apache.org>.
Maria Jesus Turiel schrieb:
> Then, I don't need use the context-param
> 
> Any idea why I lose the session?

Maybe there's something in your HTTPD configuration which filters the 
cookie headers? Have you examined the cookies in your browser and the 
Set-Cookie headers in the HTTP traffic?

Is your application accessible via the internet, so that we might take a 
look at it?

-- Andreas


> 
> Thank you very much
> 
> El vie, 17-04-2009 a las 14:39 +0200, Andreas Hartmann escribió:
>> Hi Maria Jesus,
>>
>> Maria Jesus Turiel schrieb:
>>
>> […]
>>
>>>   <!--context-param>
>>>     <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
>>>     <param-value>/some/path/to/your/webapp</param-value>
>>>     <description>An override of the session cookie path</description>
>>>    </context-param-->
>>>
>>>   <!-- Servlet Configuration ==========================================
>>> -->
>>>
>>> But, I don't understand what exactly I have to put instead of
>>> '/some/path/to/your/webapp' I've tried to replace by
>>> '/usr/local/lenya/build/lenya/webapp/' but it doesn't work
>> this is the context path for which the cookie shall be valid. You can 
>> use the parameter to tell Jetty which path to use for cookies if the 
>> servlet context differs from the context where the web application is 
>> visible via the proxy.
>>
>> E.g., if your Lenya application is visible at
>>
>>    http://www.myexample.com/cms/
>>
>> you have to set the parameter to "/cms":
>>
>>    <param-value>/cms</param-value>
>>
>> HTH,
>>
>> -- Andreas
>>
>>


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Maria Jesus Turiel <ma...@silicetelecom.com>.
Then, I don't need use the context-param

Any idea why I lose the session?

Thank you very much

El vie, 17-04-2009 a las 14:39 +0200, Andreas Hartmann escribió:
> Hi Maria Jesus,
> 
> Maria Jesus Turiel schrieb:
> 
> […]
> 
> >   <!--context-param>
> >     <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
> >     <param-value>/some/path/to/your/webapp</param-value>
> >     <description>An override of the session cookie path</description>
> >    </context-param-->
> > 
> >   <!-- Servlet Configuration ==========================================
> > -->
> > 
> > But, I don't understand what exactly I have to put instead of
> > '/some/path/to/your/webapp' I've tried to replace by
> > '/usr/local/lenya/build/lenya/webapp/' but it doesn't work
> 
> this is the context path for which the cookie shall be valid. You can 
> use the parameter to tell Jetty which path to use for cookies if the 
> servlet context differs from the context where the web application is 
> visible via the proxy.
> 
> E.g., if your Lenya application is visible at
> 
>    http://www.myexample.com/cms/
> 
> you have to set the parameter to "/cms":
> 
>    <param-value>/cms</param-value>
> 
> HTH,
> 
> -- Andreas
> 
> 
-- 
María Jesús Turiel Martínez
Dpto. Desarrollo
Silice Tecnología y Servicios
Empresa Certificada ITMark
Telf. 902 888 264


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: web.xml in ProxyPass

Posted by Andreas Hartmann <an...@apache.org>.
Hi Maria Jesus,

Maria Jesus Turiel schrieb:

[…]

>   <!--context-param>
>     <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
>     <param-value>/some/path/to/your/webapp</param-value>
>     <description>An override of the session cookie path</description>
>    </context-param-->
> 
>   <!-- Servlet Configuration ==========================================
> -->
> 
> But, I don't understand what exactly I have to put instead of
> '/some/path/to/your/webapp' I've tried to replace by
> '/usr/local/lenya/build/lenya/webapp/' but it doesn't work

this is the context path for which the cookie shall be valid. You can 
use the parameter to tell Jetty which path to use for cookies if the 
servlet context differs from the context where the web application is 
visible via the proxy.

E.g., if your Lenya application is visible at

   http://www.myexample.com/cms/

you have to set the parameter to "/cms":

   <param-value>/cms</param-value>

HTH,

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org