struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Haroon Rafique <>
Subject Re: struts2 freemarker session check
Date Tue, 28 Aug 2007 21:20:58 GMT
On Tomorrow at 12:09am, LP=>Leonidas Papadakis <> wrote:

LP> I will answer myself in case someone else has the same issue.
LP> I think since freemarker 2.3.1 or something if the session is not set 
LP> from the servlet it is not initialized in the template. Thus a check 
LP> for the Session object has to precede the check for the session 
LP> property i.e. <#if Session?exists></#if>

Hi Leonidas,

I think you can accomplish what you're trying to achieve with your 
original 1-liner slightly modified:

<#if (Session.sessionaff)?exists></#if>

Can you try that? The above will only return true, if Session exists and 
Session.sessionaff exists.

Haroon Rafique

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

View raw message