Alan wrote: > Ok so I'm a little new to Struts but not J2EE and I've been noticing > that my Value Objects that come out of EJB's in my data layer are the > exact same objects as the ActionForms that are used by Struts....and > I'm sure I'm not the first to notice this.
It comes down to still needing two classes, because the minute you say, "ALL of my forms are EXACTLY like my Value Objects," you'll find one that isn't. ;) But you can generate the code (Xdoclet?) or use Dynamic Forms (I use DynaValidatorForm) to keep from having to code all the get/set methods manually, and then use BeanUtils.copyProperties to pour the data back and forth. I wouldn't try to use the same class, it just doesn't seem like a good idea and is likely to come back to haunt you later. -- Wendy Smoak Applications Systems Analyst, Sr. Public Affairs, Information Resources Management Arizona State University, Tempe AZ