You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Musachy Barroso <mb...@wfscorp.com> on 2006/12/20 18:12:24 UTC

S2 + Spring 2.0 + JSTL question

I'm using S2 with Spring 2.0 as the object factory, and I have an action 
with a property "name".On my jsp I have:

<p>JSTL: <c:out value="${name}"/></p>
<p>S2: <s:property value="name"/></p>

Here is the weird part, when the page loads <c:out value="${name}"/> 
doesn't display anything, but <s:property value="name"/> does, if I keep 
hitting "refresh", sometimes the JSTL one displays the property. After 3 
hours, I need some fresh eyes to look at this :)

thanks
musachy

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


Re: S2 + Spring 2.0 + JSTL question

Posted by Don Brown <do...@gmail.com>.
StrutsRequestWrapper

On 12/20/06, Musachy Barroso <mb...@wfscorp.com> wrote:
> What is the class doing the wrapping?
>
> musachy
>
> Don Brown wrote:
> > I'm not sure why...we wrap the request so that calls to getAttribute
> > also search the value stack, which should return a value for the
> > property.  Try stepping through with the debugger to see what is
> > happening.
> >
> > Don
> >
> > On 12/20/06, Musachy Barroso <mb...@wfscorp.com> wrote:
> >> It works fine with s:property, c:out is the one that doesn't work.
> >>
> >> thanks
> >> musachy
> >>
> >> Martin Gainty wrote:
> >> > believe this is because of default PageContext scoping
> >> >
> >> > if name is a request param then use
> >> > <s:property value="%{#parameters.name}" />
> >> >
> >> > if name is a request scoped variable then use
> >> > <s:property value="%{#request.name}" />
> >> >
> >> > Anyone else?
> >> > M-
> >> >
> >> ---------------------------------------------------------------------------
> >>
> >> > This e-mail message (including attachments, if any) is intended for
> >> the use of the individual or entity to which it is addressed and may
> >> contain information that is privileged, proprietary , confidential
> >> and exempt from disclosure. If you are not the intended recipient,
> >> you are notified that any dissemination, distribution or copying of
> >> this communication is strictly prohibited.
> >> >
> >> ---------------------------------------------------------------------------
> >>
> >> > Le présent message électronique (y compris les pièces qui y sont
> >> annexées, le cas échéant) s'adresse au destinataire indiqué et peut
> >> contenir des renseignements de caractère privé ou confidentiel. Si
> >> vous n'êtes pas le destinataire de ce document, nous vous signalons
> >> qu'il est strictement interdit de le diffuser, de le distribuer ou de
> >> le reproduire.
> >> > ----- Original Message -----
> >> > From: "Musachy Barroso" <mb...@wfscorp.com>
> >> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> >> > Sent: Wednesday, December 20, 2006 12:12 PM
> >> > Subject: S2 + Spring 2.0 + JSTL question
> >> >
> >> >
> >> >
> >> >> I'm using S2 with Spring 2.0 as the object factory, and I have an
> >> action
> >> >> with a property "name".On my jsp I have:
> >> >>
> >> >> <p>JSTL: <c:out value="${name}"/></p>
> >> >> <p>S2: <s:property value="name"/></p>
> >> >>
> >> >> Here is the weird part, when the page loads <c:out value="${name}"/>
> >> >> doesn't display anything, but <s:property value="name"/> does, if
> >> I keep
> >> >> hitting "refresh", sometimes the JSTL one displays the property.
> >> After 3
> >> >> hours, I need some fresh eyes to look at this :)
> >> >>
> >> >> thanks
> >> >> musachy
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> 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
> >
> >
>
>
> ---------------------------------------------------------------------
> 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


Re: S2 + Spring 2.0 + JSTL question

Posted by Musachy Barroso <mb...@wfscorp.com>.
Never mind :). StrutsRequestWrapper, for future reference.

thanks
musachy

Musachy Barroso wrote:
> What is the class doing the wrapping?
>
> musachy
>
> Don Brown wrote:
>> I'm not sure why...we wrap the request so that calls to getAttribute
>> also search the value stack, which should return a value for the
>> property.  Try stepping through with the debugger to see what is
>> happening.
>>
>> Don
>>
>> On 12/20/06, Musachy Barroso <mb...@wfscorp.com> wrote:
>>> It works fine with s:property, c:out is the one that doesn't work.
>>>
>>> thanks
>>> musachy
>>>
>>> Martin Gainty wrote:
>>> > believe this is because of default PageContext scoping
>>> >
>>> > if name is a request param then use
>>> > <s:property value="%{#parameters.name}" />
>>> >
>>> > if name is a request scoped variable then use
>>> > <s:property value="%{#request.name}" />
>>> >
>>> > Anyone else?
>>> > M-
>>> > 
>>> --------------------------------------------------------------------------- 
>>>
>>> > This e-mail message (including attachments, if any) is intended 
>>> for the use of the individual or entity to which it is addressed and 
>>> may contain information that is privileged, proprietary , 
>>> confidential and exempt from disclosure. If you are not the intended 
>>> recipient, you are notified that any dissemination, distribution or 
>>> copying of this communication is strictly prohibited.
>>> > 
>>> --------------------------------------------------------------------------- 
>>>
>>> > Le présent message électronique (y compris les pièces qui y sont 
>>> annexées, le cas échéant) s'adresse au destinataire indiqué et peut 
>>> contenir des renseignements de caractère privé ou confidentiel. Si 
>>> vous n'êtes pas le destinataire de ce document, nous vous signalons 
>>> qu'il est strictement interdit de le diffuser, de le distribuer ou 
>>> de le reproduire.
>>> > ----- Original Message -----
>>> > From: "Musachy Barroso" <mb...@wfscorp.com>
>>> > To: "Struts Users Mailing List" <us...@struts.apache.org>
>>> > Sent: Wednesday, December 20, 2006 12:12 PM
>>> > Subject: S2 + Spring 2.0 + JSTL question
>>> >
>>> >
>>> >
>>> >> I'm using S2 with Spring 2.0 as the object factory, and I have an 
>>> action
>>> >> with a property "name".On my jsp I have:
>>> >>
>>> >> <p>JSTL: <c:out value="${name}"/></p>
>>> >> <p>S2: <s:property value="name"/></p>
>>> >>
>>> >> Here is the weird part, when the page loads <c:out value="${name}"/>
>>> >> doesn't display anything, but <s:property value="name"/> does, if 
>>> I keep
>>> >> hitting "refresh", sometimes the JSTL one displays the property. 
>>> After 3
>>> >> hours, I need some fresh eyes to look at this :)
>>> >>
>>> >> thanks
>>> >> musachy
>>> >>
>>> >> 
>>> ---------------------------------------------------------------------
>>> >> 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
>>
>>
>
>
> ---------------------------------------------------------------------
> 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


Re: S2 + Spring 2.0 + JSTL question

Posted by Musachy Barroso <mb...@wfscorp.com>.
What is the class doing the wrapping?

musachy

Don Brown wrote:
> I'm not sure why...we wrap the request so that calls to getAttribute
> also search the value stack, which should return a value for the
> property.  Try stepping through with the debugger to see what is
> happening.
>
> Don
>
> On 12/20/06, Musachy Barroso <mb...@wfscorp.com> wrote:
>> It works fine with s:property, c:out is the one that doesn't work.
>>
>> thanks
>> musachy
>>
>> Martin Gainty wrote:
>> > believe this is because of default PageContext scoping
>> >
>> > if name is a request param then use
>> > <s:property value="%{#parameters.name}" />
>> >
>> > if name is a request scoped variable then use
>> > <s:property value="%{#request.name}" />
>> >
>> > Anyone else?
>> > M-
>> > 
>> --------------------------------------------------------------------------- 
>>
>> > This e-mail message (including attachments, if any) is intended for 
>> the use of the individual or entity to which it is addressed and may 
>> contain information that is privileged, proprietary , confidential 
>> and exempt from disclosure. If you are not the intended recipient, 
>> you are notified that any dissemination, distribution or copying of 
>> this communication is strictly prohibited.
>> > 
>> --------------------------------------------------------------------------- 
>>
>> > Le présent message électronique (y compris les pièces qui y sont 
>> annexées, le cas échéant) s'adresse au destinataire indiqué et peut 
>> contenir des renseignements de caractère privé ou confidentiel. Si 
>> vous n'êtes pas le destinataire de ce document, nous vous signalons 
>> qu'il est strictement interdit de le diffuser, de le distribuer ou de 
>> le reproduire.
>> > ----- Original Message -----
>> > From: "Musachy Barroso" <mb...@wfscorp.com>
>> > To: "Struts Users Mailing List" <us...@struts.apache.org>
>> > Sent: Wednesday, December 20, 2006 12:12 PM
>> > Subject: S2 + Spring 2.0 + JSTL question
>> >
>> >
>> >
>> >> I'm using S2 with Spring 2.0 as the object factory, and I have an 
>> action
>> >> with a property "name".On my jsp I have:
>> >>
>> >> <p>JSTL: <c:out value="${name}"/></p>
>> >> <p>S2: <s:property value="name"/></p>
>> >>
>> >> Here is the weird part, when the page loads <c:out value="${name}"/>
>> >> doesn't display anything, but <s:property value="name"/> does, if 
>> I keep
>> >> hitting "refresh", sometimes the JSTL one displays the property. 
>> After 3
>> >> hours, I need some fresh eyes to look at this :)
>> >>
>> >> thanks
>> >> musachy
>> >>
>> >> ---------------------------------------------------------------------
>> >> 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
>
>


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


Re: S2 + Spring 2.0 + JSTL question

Posted by Don Brown <do...@gmail.com>.
I'm not sure why...we wrap the request so that calls to getAttribute
also search the value stack, which should return a value for the
property.  Try stepping through with the debugger to see what is
happening.

Don

On 12/20/06, Musachy Barroso <mb...@wfscorp.com> wrote:
> It works fine with s:property, c:out is the one that doesn't work.
>
> thanks
> musachy
>
> Martin Gainty wrote:
> > believe this is because of default PageContext scoping
> >
> > if name is a request param then use
> > <s:property value="%{#parameters.name}" />
> >
> > if name is a request scoped variable then use
> > <s:property value="%{#request.name}" />
> >
> > Anyone else?
> > M-
> > ---------------------------------------------------------------------------
> > This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
> > ---------------------------------------------------------------------------
> > Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
> > ----- Original Message -----
> > From: "Musachy Barroso" <mb...@wfscorp.com>
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Sent: Wednesday, December 20, 2006 12:12 PM
> > Subject: S2 + Spring 2.0 + JSTL question
> >
> >
> >
> >> I'm using S2 with Spring 2.0 as the object factory, and I have an action
> >> with a property "name".On my jsp I have:
> >>
> >> <p>JSTL: <c:out value="${name}"/></p>
> >> <p>S2: <s:property value="name"/></p>
> >>
> >> Here is the weird part, when the page loads <c:out value="${name}"/>
> >> doesn't display anything, but <s:property value="name"/> does, if I keep
> >> hitting "refresh", sometimes the JSTL one displays the property. After 3
> >> hours, I need some fresh eyes to look at this :)
> >>
> >> thanks
> >> musachy
> >>
> >> ---------------------------------------------------------------------
> >> 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


Re: S2 + Spring 2.0 + JSTL question

Posted by Musachy Barroso <mb...@wfscorp.com>.
It works fine with s:property, c:out is the one that doesn't work.

thanks
musachy

Martin Gainty wrote:
> believe this is because of default PageContext scoping
>
> if name is a request param then use
> <s:property value="%{#parameters.name}" />
>
> if name is a request scoped variable then use
> <s:property value="%{#request.name}" />
>
> Anyone else?
> M-
> --------------------------------------------------------------------------- 
> This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
> --------------------------------------------------------------------------- 
> Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
> ----- Original Message ----- 
> From: "Musachy Barroso" <mb...@wfscorp.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Wednesday, December 20, 2006 12:12 PM
> Subject: S2 + Spring 2.0 + JSTL question
>
>
>   
>> I'm using S2 with Spring 2.0 as the object factory, and I have an action 
>> with a property "name".On my jsp I have:
>>
>> <p>JSTL: <c:out value="${name}"/></p>
>> <p>S2: <s:property value="name"/></p>
>>
>> Here is the weird part, when the page loads <c:out value="${name}"/> 
>> doesn't display anything, but <s:property value="name"/> does, if I keep 
>> hitting "refresh", sometimes the JSTL one displays the property. After 3 
>> hours, I need some fresh eyes to look at this :)
>>
>> thanks
>> musachy
>>
>> ---------------------------------------------------------------------
>> 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


Re: S2 + Spring 2.0 + JSTL question

Posted by Martin Gainty <mg...@hotmail.com>.
believe this is because of default PageContext scoping

if name is a request param then use
<s:property value="%{#parameters.name}" />

if name is a request scoped variable then use
<s:property value="%{#request.name}" />

Anyone else?
M-
--------------------------------------------------------------------------- 
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--------------------------------------------------------------------------- 
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
----- Original Message ----- 
From: "Musachy Barroso" <mb...@wfscorp.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, December 20, 2006 12:12 PM
Subject: S2 + Spring 2.0 + JSTL question


> I'm using S2 with Spring 2.0 as the object factory, and I have an action 
> with a property "name".On my jsp I have:
> 
> <p>JSTL: <c:out value="${name}"/></p>
> <p>S2: <s:property value="name"/></p>
> 
> Here is the weird part, when the page loads <c:out value="${name}"/> 
> doesn't display anything, but <s:property value="name"/> does, if I keep 
> hitting "refresh", sometimes the JSTL one displays the property. After 3 
> hours, I need some fresh eyes to look at this :)
> 
> thanks
> musachy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>