you could do this <c:set var="req" value="${pageContext.request}"/>
<s:property value="\%{ attr['req'].contextPath }"/> <s:property value="\%{ attr['req'].pathInfo }"/> Basically, stuff the object into the pageContext somehow and then reference it again via ognl. It's a pain, but a very slight one. -a Manuel Correa wrote: > > How I get the contextPath with OGNL?? Or the other request methods? > > Manuel Correa. > > -----Original Message----- > From: Chris Pratt [mailto:[EMAIL PROTECTED] > Sent: Monday, October 29, 2007 12:17 PM > To: Struts Users Mailing List > Subject: Re: S2: EL in tags 2.0.11 > > On 10/29/07, Manuel Correa <[EMAIL PROTECTED]> wrote: >> In S2.09 is possible to use EL in the properties tags. For example: >> >> <s:property value="${pageContext.request.contextPath}" /> >> >> That because the parameter in tld is rtexprvalue="true" >> >> In S2.0.11 this is not possible (rtexprvalue="false"). I want to > know >> is some property that active and un-active this parameter in the TLD. > Or >> what is the best way to use EL in tags. >> > > I believe that was done as a security precaution. Since each EL is > processed one after the other, it made it possible for some malicious > user of your system (with enough knowledge of the internals of your > system) to enter a value that the JSP EL would translate into naughty > OGNL that your system would happily translate, giving away all your > secrets. > > What I've done in my tag library (that isn't quite finished yet) is to > set all the rtexprvalue's to false, but then check the value for > either the ${ } or %{ } EL variables and process the value through one > or the other, but never both, EL processors. It seems to be working > nicely, is very flexible and shouldn't have the same vulnerabilities > of the previous struts 2 tags. > (*Chris*) > > --------------------------------------------------------------------- > 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#a13474135 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]