struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manuel Correa" <>
Subject RE: S2: EL in tags 2.0.11
Date Tue, 30 Oct 2007 16:47:52 GMT
That is not possible, because in Struts 2.0.11 you can't use EL in any
Struts tag, including <s:set ... 

Manuel Correa.

-----Original Message-----
From: Chris Pratt [] 
Sent: Tuesday, October 30, 2007 12:11 PM
To: Struts Users Mailing List
Subject: Re: S2: EL in tags 2.0.11

On 10/30/07, Manuel Correa <> wrote:
> Didn't work: <s:property
> I think that the best solution is rewrite the tld. Is painful.
> Manuel Correa.

If you're looking for the simplest solution, you should be able to
define a request scoped variable at the top of the page using JSTL:

<c:set var="contextPath" value="${pageContext.request.contextPath"}"

And then whenever you need the value using OGNL, you can use:


(possibly surrounding it with <s:property> if necessary)

I agree, it's definitely much harder to understand at a glance, but
until the tag library is truly fixed, this is probably the "easiest"

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message