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
// no output?
<%= ((csp.Cart)session.getAttribute("cart")).getSubTotal() %
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
// no output?
<%= ((csp.Cart)session.getAttribute("cart")).getSubTotal() %
What do you mean?
The index will let you get and set values of an array of some sort.
On 27 Dec 2003, at 04:18, Rajesh, Harikrishnan (H.) wrote:
Hi,
Thanks for the info, I can understand this type of program would suit
a static multibox, I need some coding for a dynamic array of
multiboxe
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]>
Reply-To: <[EMAIL PROTECTED
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
is at the top of the JSP file and other tags are working in the
same page...
-Original Message-
From: Sharad Acharya [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 27, 2003 9:48 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: R
There are a number of options available here, i'd have a different def
that extends showList , I'd call this base.list and then have different
defs per list.
name="user.list" extends="base.list"
in fact i assumed you'd only have to over load body, you could even
have a def as the value of body
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 tags are working
in the
same page...
-Original Message-
From: Sharad Acharya [mailto:[EMAIL PROTECTED]
Sent: S
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: not writing?
Aren't
Yes. And mine are. But, a logic URI is specified in my web.xml as follows:
/tags/struts-bean
/WEB-INF/struts-bean.tld
All my tags are defined like this and all are working (even ) as
advertised, except in this one case.
-Original Message-
From: Mark Lowe [mailto:[EMAI
Not according to the Struts User Guide, i.e.:
http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_tagl
ib
/tags/struts-bean
/WEB-INF/struts-bean.tld
-Original Message-
From: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 27, 200
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
JSTL give better debug info even if it doesn't look as clean as the tag
libs.
And there's also
On 27 Dec 2003, at 15:04, Michael Marrotte wrote:
Ye
I'm pretty sure this boils down to the way PropertyUtils works.
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 value
works.
But,
Does not...
Mean anything?
Do I need a taglib descriptor for ?
--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: not writing?
Fair enough
The only other t
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: not writing?
works
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:
works.
But,
Does not...
Mean anything?
Do I need a taglib descriptor for ?
--Mike M.
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROT
Hi,
I am trying to test for the presence of a request attribute called "PCAT".
This works:
if (request.getAttribute ("PCAT") != null)
This doesn't work:
What Struts logic tag would work?
Thanks,
Will
-
To unsubscribe,
Hi @ll;
In my Form I define an Array, which contains some message resource keys.
I'm able to print out the values,
but what I want to archive is that it prints out the value from the
application resource properties and also I
wanted to use an logic:iterate to print them out, so it should be
so
Kris,
Sounds good. Looks like the answer was (wasn't) looking for.
But, I'm sure it's a great feature in a different context.
Thanks,
--Mike M.
-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 27, 2003 10:13 AM
To: Struts Users Mailing Lis
You could try something like this.
public class Cart extends ActionForm {
private String subTotal;
private ArrayList items;
public BigDecimal getSubTotal() {
for(int i = 0;i < items.size();i++) {
CartItem item = (CartItem) items.ge
Hi,
In my Form I define an Array, which contains some message resource keys.
I'm able to print out the values,
but what I want to archive is that it prints out the value from the
application resource properties and also I
wanted to use an logic:iterate to print them out, so it should be
someth
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;
publ
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"; %>
map.class:
obj.class:
map.class:
Produces:
map.class:
obj.class: class java.lang.Object
map.class:
Of course! I just need to forward to the def that corresponds to the
user's settings. Very simple and elegant.
However, theoretically, what if I had three tiles in a definition, each
of which could get any one of the same 10 different values. In that
case I'd need to create 1000 definitions in
I have a problem using filter chain with Struts
I have wrote a simple filter to use in a servlet
filter chain for postprocessing JSP output.
It works like this:
1. Receive request, wrap response with its own
response wrapper, and then pass it to filter chain.
2. The filter own response wrapper
One recommendation I've received from this list is to have your
'variable' tile be an Action, so that you would have an order of
magnitude less tile defs to create ... at least, that's how I understood
it :)
Brady Hegberg wrote:
Of course! I just need to forward to the def that corresponds to
You could over load on the insert
or do it a specialized action. There are plenty of options although I
have trouble thinking of many scenarios where having 1000 different
definitions would be required.
In such a case having an action that mediated in the tile selection i
guess coul
Brice Ruth wrote:
One recommendation I've received from this list is to have your
'variable' tile be an Action, so that you would have an order of
magnitude less tile defs to create ... at least, that's how I understood
it :)
Sorry about that;-}It's not easy to explain on the list. Now there is
I think this article will explain that Microsoft is not support Open
Source community, M$ only support people that want to support money, :)
Our War Money Chest is bigger than all of you all the Java guys
(including the Open Source).
[EMAIL PROTECTED] how can M$ have that money?
So, this mean
I think Eclipse is own by commynity, but with IBM money, they put all
the contributor, commiter, and the decision for next version by their
empolyee.
This is not a product from home ground dude. :)
So, in my head, Eclipse is still IBM. like it or not. Event if IBM go
bancrupt, Eclipse still th
yah, M$ and Bill is arogan, they never give the fans a space, i think
they hurting us again, if we are using .NET offcourse.
THis case smiliar with mvps.org case, :) never supported by Microsoft,
even they are using Microsoft product.
So, how about you?
Joe Hertz wrote:
It was left handed bas
30 matches
Mail list logo