struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonidas Papadakis ...@creteonline.gr>
Subject Re: struts2 freemarker session check
Date Tue, 28 Aug 2007 21:09:17 GMT
I will answer myself in case someone else has the same issue.

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

Leonidas

Leonidas Papadakis wrote:
> Hi there,
>
> i used to have this expression : <#if Session.sessionaff?exists></#if> 
> in my freemarker template.
> Unfortunately this does not get parsed and generates an error : 
> Expression Session is undefined on line ....
>
> Can anyone tell me the new syntax please ?
>
> Thank you very much
>
> Leonidas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message