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 Use of OGNL expression to access request headers
Date Thu, 25 Oct 2012 03:43:53 GMT
	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

<put-attribute name="test"   expression="OGNL:requestScope"

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'ia Internet no son seguras y, por lo tanto,
Banco Santander International no asume responsabilidad legal 
ni de ning'un otro tipo por el contenido de este mensaje. 
Cualquier opini'on transmitida pertenece 'unicamente al autor y 
no necesariamente representa la opini'on de Banco Santander 
International, a no ser que est'e expresamente detallado.

View raw message