struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lowe <mark.l...@talk21.com>
Subject Re: <bean:write> not writing?
Date Sat, 27 Dec 2003 15:47:32 GMT
Kris's point sounds good..

As your bean extends hashMap the tags are getting confused.

On 27 Dec 2003, at 15:23, Michael Marrotte wrote:

> <jsp:getProperty name="cart" property="subTotal" />
>
> works.
>
> But,
>
> <c:out value="${cart.subTotal}" />
>
> <c:out value="${session.cart.subTotal}" />
>
> Does not...
>
> Mean anything?
>
> Do I need a taglib descriptor for <c:out>?
>
> --Mike M.
>
> -----Original Message-----
> From: Mark Lowe [mailto:mark.lowe@talk21.com]
> Sent: Saturday, December 27, 2003 10:08 AM
> To: Struts Users Mailing List
> Subject: Re: <bean:write> not writing?
>
>
> Fair enough
>
> The only other thing i can think of is to use jstl or old jsp tags
> instead
>   or try using the scope attribute of bean:write
>
> <bean:write name="cart" property="subTotal" scope="session" />
>
> <c:out value="${cart.subTotal}" />
>
> <c:out value="${session.cart.subTotal}" />
>
> JSTL give better debug info even if it doesn't look as clean as the tag
> libs.
>
> And there's also
>
> <jsp:getProperty name="cart" property="subTotal" />
>
>
>
>
> On 27 Dec 2003, at 15:04, Michael Marrotte wrote:
>
>> Yes.  And mine are.  But, a logic URI is specified in my web.xml as
>> follows:
>>
>> <!-- Struts Tag Library Descriptors -->
>>   <taglib>
>>     <taglib-uri>/tags/struts-bean</taglib-uri>
>>     <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
>>   </taglib>
>>
>>
>> All my tags are defined like this and all are working (even
>> <bean:write>) as
>> advertised, except in this one case.
>>
>>
>>
>> -----Original Message-----
>> From: Mark Lowe [mailto:mark.lowe@talk21.com]
>> Sent: Saturday, December 27, 2003 9:52 AM
>> To: Struts Users Mailing List
>> Subject: Re: <bean:write> not writing?
>>
>>
>> Aren't tags usually in /WEB-INF?
>>
>>
>> On 27 Dec 2003, at 14:57, Michael Marrotte wrote:
>>
>>> <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
>>>
>>> is at the top of the JSP file and other <bean:write> tags are working
>>> in the
>>> same page...
>>>
>>> -----Original Message-----
>>> From: Sharad Acharya [mailto:sharad_acharya@hotmail.com]
>>> Sent: Saturday, December 27, 2003 9:48 AM
>>> To: marrottem@homes.com; struts-user@jakarta.apache.org
>>> Subject: RE: <bean:write> not writing?
>>>
>>>
>>> Michael;
>>> Did you forget to specify the taglib directive for bean:write tag
>>> library in
>>> your JSP? In such case, have following in your JSP.
>>>
>>> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
>>>
>>> Hope this helps.
>>> Sharad
>>>
>>>
>>>
>>>
>>>> From: "Michael Marrotte" <marrottem@homes.com>
>>>> Reply-To: <marrottem@homes.com>
>>>> To: <struts-user@jakarta.apache.org>
>>>> Subject: <bean:write> not writing?
>>>> Date: Sat, 27 Dec 2003 08:51:18 -0500
>>>>
>>>> Here's the bean:
>>>>
>>>> public class Cart extends HashMap {
>>>>     private double subTotal = 400.00;
>>>>     public double getSubTotal(){return subTotal;}
>>>> }
>>>>
>>>>
>>>> Here's the Java:
>>>>
>>>> session.setAttribute("cart", new Cart());
>>>>
>>>>
>>>> Here's the JSP
>>>>
>>>> <bean:write name="cart" property="subTotal"/> // no output?
>>>> <%= ((csp.Cart)session.getAttribute("cart")).getSubTotal() %> //
>>>> works,
>>>> writes 400.0
>>>>
>>>>
>>>> Here's the problem
>>>>
>>>> <bean:write> isn't producing any output, but
>>>>
>>>> <%= ... %> is...
>>>>
>>>> Any ideas are greatly appreciated.
>>>>
>>>> Thanks,
>>>>
>>>> --Mike M.
>>>>
>>>>
>>>> -------------------------------------------------------------------- 
>>>> -
>>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>>
>>>
>>> _________________________________________________________________
>>> Tired of slow downloads? Compare online deals from your local
>>> high-speed
>>> providers now.  https://broadband.msn.com
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Mime
View raw message