Re: images attachements in jwma

Serge Huber <[email protected]>
Newsgroups gmane.comp.cms.jahia.template
Message-ID <[email protected]>
Miriam wrote:

>Serge Huber <shuber2 <at> jahia.com> writes:
>
>  
>
>>Hi Miriam,
>>    
>>
>
>  
>
>>- you might also run into issues with the session. By linking directly 
>>to the servlet, you will most probably loose the session (unless you are 
>>using a special configuration with Tomcat 5.5). This is due to the fact 
>>that before Tomcat 5.5 sessions are not shared across web application 
>>contexts (Tomcat 5.5 introduces a new configuration option that allows 
>>this, more info here : 
>>http://weblogs.java.net/blog/wholder/archive/2005/02/session_session.html 
>>).
>>    
>>
>
>Hello again,
>This is only to confirm that I've understood correctly what is happening 
>because after getting Tomcat 5.5.9 get working with Jahia, I have the same 
>problem:
>If I click directly to the servlet, I still loose the session. Is it neccesary 
>to send the session to the servlet controller in some way? 
>I explain the steps:
>Suppose that I'm  logged into webmail and I want to see a mail that has an 
>image attachment:
>
>1.- I click in the message I want to see and message.jsp page is called. This 
>jsp page (if an attachment is included) calls a method of class X, which 
>returns something like 
><img border="0" src="/webmail/jwma?acton=message&todo=displaypart&number=0">
>(because I haven't used encodeURL method, so servlet is directly called).
>
>2.- jwma is the controller servlet and according to the parameters, its 
>displaypart method should be called, but before it an exception is thrown 
>because the servlet "thinks" that the user is not authentificated and it 
>redirects you to login again.
>
>Is is neccesary to pass the session from class X to controller servlet in some 
>way? I supposed that thanks to new configuration of Tomcat 5.5, this was not 
>necessary.
>  
>
This is indeed a tricky problem. What I would suggest is looking at what 
is going on with the JSESSIONID cookie in the browser, and seeing if the 
cookie has the correct path. Normally with the emptySessionPath setting, 
the path should always be empty. If it is not it means that something is 
probably wrong with the Tomcat configuration.

This is a problem that is not specific to Jahia, but to any portal 
installation, such as Jetspeed 2, Pluto, etc. You might want to "google" 
a bit to see if you can find more details about this there.

Regards,
  Serge Huber.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.