My apologies if it was misinterpreted. I did not say it WOULD work, I said
it would take some effort to get it to work, but that it does not work.
At this point, I believe you have a number of options :
1) You can use the method i showed you :
<c:set var="req" value="${pageContext.request}"/>
<s:property value="\%{ attr['req'].contextPath }"/>
<s:property value="\%{ attr['req'].pathInfo }"/>
2) You can build your own custom copy of struts2 that has the tld with the
rtexpr value enabled, but be advised that you are reenabling a security
risk.
3) you can not use s2 tags, if you're that reliant on the jstl/el expression
language.
-a
Manuel Correa wrote:
>
> page <s:property value="%{#request.request.contextPath}"/>
>
> Didn't work!
>
> Have to be a way to active the EL in the Attributes..
>
>
> Manuel Correa.
>
> -----Original Message-----
> From: cilquirm [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 29, 2007 3:17 PM
> To: [email protected]
> Subject: Re: [struts] S2: EL in tags 2.0.11
>
>
>
> I could be wrong ( and I hope I am ), but I thought the request object
> in
> that case was just a map facade to the underlying request attributes
> map.
>
> Which is why I supposed you say #request['foo'] vs.
> #request.getAttribute('foo').
>
> Same goes for session. ( #session['foo'] vs
> #session.getAttribute('foo') )
>
> I just checked Dispatcher and it seems that #request and #session are
> instances of RequestMap and SessionMap respectively, in which a Map
> wraps
> the access to getAttribute.
>
> If these were extended to have a getRequest/getSession method, then we
> might
> be able to say
>
> #request.request.contextPath.
>
>
>
>
>
> DNewfield wrote:
>>
>> cilquirm wrote:
>>> you could do this
>>>
>>> <c:set var="req" value="${pageContext.request}"/>
>>>
>>> <s:property value="\%{ attr['req'].contextPath }"/>
>>>
>>> <s:property value="\%{ attr['req'].pathInfo }"/>
>>
>> Isn't the request on the valuestack?
>> <s:property value="%{#request.contextPath}"/> should be all you
> need...
>>
>> http://wiki.opensymphony.com/display/OGNL/OGNL+Basics
>>
>> -Dale
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/S2%3A-EL-in-tags-2.0.11-tf4712519.html#a13474669
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/S2%3A-EL-in-tags-2.0.11-tf4712519.html#a13476195
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]