Unfortunately you can't use JSTL in Struts 2 tags anymore.  I got around
this by using JSTL to set the parameter into page scope:

<c:set var="paramName" value="${param.paramName}"/>

Once it's in page scope #attr will find it:

<s:if test="#attr.paramName == 'someStringValue'">found it!</s:if>

-B



                                                                           
             "Musachy Barroso"                                             
             <[EMAIL PROTECTED]                                             
             m>                                                         To 
                                       "Struts Users Mailing List"         
             08/26/2008 06:57          <user@struts.apache.org>            
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: couldn't access s:include param 
               "Struts Users           using #parameters                   
               Mailing List"                                               
             <[EMAIL PROTECTED]                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           




Parameters are passed as request parameters, so use the
${param.ParamName} notation to access them.

musachy

On Tue, Aug 26, 2008 at 9:51 PM, Martin Gainty <[EMAIL PROTECTED]> wrote:
>
> in your struts-default.xml or xwork-default.xml
> can you verify you have implemented ParametersInterceptor
> <interceptor name="params"
class="com.opensymphony.xwork2.interceptor.ParametersInterceptor"/>
>  in your <default> stack
>
> ?
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained within
this transmission.
>
>
>> Date: Tue, 26 Aug 2008 18:10:14 -0700
>> From: [EMAIL PROTECTED]
>> To: user@struts.apache.org
>> Subject: couldn't access s:include param using #parameters
>>
>>
>> Okay I have made 2 small jsp. I can't access parameters passed in from
>> s:include (struts 2.0.11.2) by #parameters.<parametername> OR
>> #parameters['<parametername>']. Am I doing something really wrong?
>>
>> quicktest.jsp:
>> <%@ taglib prefix="s" uri="/struts-tags" %>
>>
>> <s:include value="quicktestincluded.jsp">
>>      <s:param name="defaultValue">0</s:param>
>> </s:include>
>>
>> quicktestincluded.jsp:
>> <%@ taglib prefix="s" uri="/struts-tags" %>
>>
>> parameter with $ { } : ${param.defaultValue} <br>
>> parameter with s:property: <s:property
value="#parameters.defaultValue"/>
>>
>> Now if I access quicktest.do. It give me the following:
>> parameter with $ { } : 0
>> parameter with s:property:
>>
>> And if I access quicktestincluded.do like this
>> 'quicktestincluded.do?defaultValue=0' it would give me:
>> parameter with $ { } : 0
>> parameter with s:property: 0
>>
>> --
>> View this message in context:
http://www.nabble.com/couldn%27t-access-s%3Ainclude-param-using--parameters-tp19173169p19173169.html

>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
> _________________________________________________________________
> Be the filmmaker you always wanted to be—learn how to burn a DVD with
Windows(R).
> http://clk.atdmt.com/MRT/go/108588797/direct/01/



--
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
This message, together with any attachments, is
intended only for the use of the individual or entity
to which it is addressed. It may contain information
that is confidential and prohibited from disclosure.
If you are not the intended recipient, you are hereby
notified that any dissemination or copying of this
message or any attachment is strictly prohibited. If
you have received this message in error, please notify
the original sender immediately by telephone or by
return e-mail and delete this message, along with any
attachments, from your computer. Thank you.

---------------------------------------------------------------------

Reply via email to