bean:write not writing?

2003-12-27 Thread Michael Marrotte
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? %=

RE: bean:write not writing?

2003-12-27 Thread Michael Marrotte
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? %=

RE: bean:write not writing?

2003-12-27 Thread Sharad Acharya
] To: [EMAIL PROTECTED] 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

RE: bean:write not writing?

2003-12-27 Thread Michael Marrotte
] 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 [EMAIL PROTECTED

Re: bean:write not writing?

2003-12-27 Thread Mark Lowe
] Sent: Saturday, December 27, 2003 9:48 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] 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

RE: bean:write not writing?

2003-12-27 Thread Matthias Wessendorf
hi, it must end with .tld %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % and place the file in /WEB-INF -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Saturday, December 27, 2003 3:52 PM To: Struts Users Mailing List Subject: Re: bean:write not writing

RE: bean:write not writing?

2003-12-27 Thread Michael Marrotte
(even bean:write) as advertised, except in this one case. -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] 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

RE: bean:write not writing?

2003-12-27 Thread Michael Marrotte
-Original Message- From: Matthias Wessendorf [mailto:[EMAIL PROTECTED] Sent: Saturday, December 27, 2003 9:54 AM To: 'Struts Users Mailing List' Subject: RE: bean:write not writing? hi, it must end with .tld %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % and place the file in /WEB-INF

Re: bean:write not writing?

2003-12-27 Thread Mark Lowe
: 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

Re: bean:write not writing?

2003-12-27 Thread Kris Schneider
I'm pretty sure this boils down to the way PropertyUtils works. bean:write will use PropertyUtils.getProperty(bean, property) to retrieve the subTotal property from the bean cart. PropertyUtils will test whether or not cart is a Map (which it is) and then call Map.get to retrieve the property

RE: bean:write not writing?

2003-12-27 Thread Michael Marrotte
: 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

RE: bean:write not writing?

2003-12-27 Thread Ivan De La Pena
yeah buddyneed the tld for 'c' , declare the uri in the web.xml and the refer to that uri in ur jsp page. -Original Message- From: Michael Marrotte [mailto:[EMAIL PROTECTED] Sent: Saturday, December 27, 2003 10:24 AM To: Struts Users Mailing List Subject: RE: bean:write not writing

Re: bean:write not writing?

2003-12-27 Thread Mark Lowe
anything? Do I need a taglib descriptor for c:out? --Mike M. -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] 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

RE: bean:write not writing?

2003-12-27 Thread Michael Marrotte
List Subject: Re: bean:write not writing? I'm pretty sure this boils down to the way PropertyUtils works. bean:write will use PropertyUtils.getProperty(bean, property) to retrieve the subTotal property from the bean cart. PropertyUtils will test whether or not cart is a Map (which

Re: bean:write not writing?

2003-12-27 Thread Mark Lowe
context. Thanks, --Mike M. -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Saturday, December 27, 2003 10:13 AM To: Struts Users Mailing List Subject: Re: bean:write not writing? I'm pretty sure this boils down to the way PropertyUtils works. bean:write will use

Re: bean:write not writing?

2003-12-27 Thread Jason Lea
I have read about people having problems getting or setting a bean which does not fit the bean specification. In that case the Cart object would also need a setSubTotal(double dbl) method, even if it is not used eg public class Cart extends HashMap { private double subTotal = 400.00;

Re: bean:write not writing?

2003-12-27 Thread Kris Schneider
I doubt JSTL will be any happier with a class that's trying to be both a Map and a JavaBean: %@ page contentType=text/plain % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % jsp:useBean id=map class=java.util.HashMap/ jsp:useBean id=obj class=java.lang.Object/ map.class: c:out