tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Luis Martinez Avial" <jlmarti...@pb-santander.com>
Subject RE: Use of OGNL expression to access request headers
Date Tue, 30 Oct 2012 09:13:18 GMT
Any ideas?

José  Luis Martínez-Avial
Web Applications Global Head
Information Technology
Santander Private Banking
1401 Brickell Avenue, Suite 1500, Miami FL 33131
Phone: 305.539.2417

-----Original Message-----
From: Jose Luis Martinez Avial 
Sent: Wednesday, October 24, 2012 11:44 PM
To: users@tiles.apache.org
Subject: Use of OGNL expression to access request headers

	I'm using Tiles 2.2.2  in my application (Struts 2.2.3). I want to use expressions in order
to modify my screen composition depending on some attribute in the request. Basically, I would
like to change the extends of a screen depending if there is a header in the request with
name "x-requested-with" and the value is "XMLHttpRequest". Is it possible to do that? I've
tried to do a simple example with an attribute:

<put-attribute name="test"   expression="OGNL:requestScope"  cascade="true"/>

I've tried different expressions like OGNL:%{#request.headers.referer}, OGNL:#request.headers.referer,
OGNL:requestScope.headers.referer , etc. But it always returns null. I haven't found any documentation
on how the OGNL expressions works on Tiles, so I'm working based on how I would do it with
Struts. But it doesn't seem to work. Can somebody help me?



Internet communications are not secure and therefore Banco 
Santander International does not accept legal responsibility for 
the contents of this message. Any views or opinions presented 
are solely those of the author and do not necessarily represent 
those of Banco Santander International unless otherwise 
specifically stated. 

Las comunicaciones vía Internet no son seguras y, por lo tanto,
Banco Santander International no asume responsabilidad legal 
ni de ningún otro tipo por el contenido de este mensaje. 
Cualquier opinión transmitida pertenece únicamente al autor y 
no necesariamente representa la opinión de Banco Santander 
International, a no ser que esté expresamente detallado.

View raw message