struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From poof65 <poo...@gmail.com>
Subject Re: [Struts2] Retrieve parameter scope variables with OGNL
Date Thu, 25 Mar 2010 14:59:07 GMT
Ok thank you for the answer.
I've had already found a workaround using s:set but i wanted to know
if a clean solution did exist.

I will take a look at tag file when i'll have some free time.

On Thu, Mar 25, 2010 at 3:00 PM, Greg Lindholm <greg.lindholm@gmail.com> wrote:
> This seems to be a common problem that has been asked about many times
> on this list (see search for include + param):
>
> http://old.nabble.com/forum/Search.jtp?forum=206&local=y&query=include+param
>
> I've never seen a definitive answer (but maybe it's buried in the above search).
>
> In my latest project we decided to switch to using Tag files instead
> of includes and they work great, I'll never go back to includes.  With
> tag files you can pass type-safe parameters (called attributes) and
> they are easy to access in struts tags with #attr.
>
> Here are a couple references on Tag files.
>
> http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags5.html
>
> http://onjava.com/pub/a/onjava/excerpt/jserverpages3_ch11/index.html
>
>
>
> On Thu, Mar 25, 2010 at 9:04 AM, poof65 <poof65@gmail.com> wrote:
>> No i didn't try this syntax because param is a special EL variable
>> that contain request parameter and i don't have a variable named
>> param.
>>
>> I've just tried to be sure and it didn't work either.
>> I thought it was contained in the ognl #parameters special variable
>> but apparently it's not the case.
>>
>> On Thu, Mar 25, 2010 at 12:20 PM, Hoying, Ken <Ken_Hoying@premierinc.com> wrote:
>>> If you can display it with ${ param.blocSource }, did you try #attr.param.blocSource?
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: poof65 [mailto:poof65@gmail.com]
>>> Sent: Thursday, March 25, 2010 6:01 AM
>>> To: user@struts.apache.org
>>> Subject: [Struts2] Retrieve parameter scope variables with OGNL
>>>
>>> Hi,
>>>
>>> i'm using jsp:include to include a jsp from another but i've a problem
>>> to get the value set in the jsp:param tag.
>>>
>>> <jsp:include page="../include/blocs/blocEnteteDossier.jsp">
>>>        <jsp:param name="blocSource" value="depeche" />
>>> </jsp:include>
>>>
>>> I can display the value with EL (${ param.blocSource }) but my goal is
>>> to test it in a s:if tag.
>>> I've tried many solutions but none of them give me the correct result.
>>>
>>> <s:property value="blocSource"/>
>>> <s:property value="#blocSource"/>
>>> <s:property value="#attr.blocSource"/>
>>> <s:property value="#request.blocSource"/>
>>> <s:property value="#session.blocSource"/>
>>> <s:property value="#application.blocSource"/>
>>> <s:property value="#parameters.blocSource"/>
>>>
>>>
>>> My question is, are the struts scopes compatbiles with standards
>>> jsp/servlets scopes ?
>>>
>>> Thanks for reading :-)
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>> -----------------------------------------
>>> ***Note:The information contained in this message may be privileged
>>> and confidential and protected from disclosure. If the reader of
>>> this message is not the intended recipient, or an employee or agent
>>> responsible for delivering this message to the intended recipient,
>>> you are hereby notified that any dissemination, distribution or
>>> copying of this communication is strictly prohibited.  If you have
>>> received this communication in error, please notify the Sender
>>> immediately by replying to the message and deleting it from your
>>> computer.  Thank you.  Premier Inc.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message