You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Juriy Bura <ju...@gmail.com> on 2009/08/21 00:30:19 UTC

Application context in freemarker

Hi,

I'm working with freemarker as the template engine instead of JSP.
What I am trying to do is to access the parameter defined in web.xml
as context-param from freemarker template. I'm using technique
described here:
http://struts.apache.org/2.1.2/docs/using-freemarker-templates.html

<#if Application.myApplicationAttribute?exists>
     ${Application.myApplicationAttribute}
</#if>

What I am getting is "Expression Application is undefined" error in template.
The most interesting thing here is that if I list model keys like this:

[#list .data_model?keys as modelkey]
	<li>${modelkey}</li>
[/#list]

I see that Application is there.

Do you have any ideas how to solve this problem?

Regards,
Juriy.

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