Re: Digester Examples
the sample application has most of what is necessary. I do remember having problems with the digester when I was doing my own poc however and that was after understanding the example app and reading the docs. I think the example app is part of the source download for struts 1.0 Sandeep --- Phase Communcations [EMAIL PROTECTED] wrote: Does anyone know of some good concise digester examples and tutorials. I have been reading the docs but am unsure of several aspects of it. Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Digester Examples
The Digester is now a Commons component. http://jakarta.apache.org/commons/digester.html Phase Communcations wrote: Does anyone know of some good concise digester examples and tutorials. I have been reading the docs but am unsure of several aspects of it. Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Question on Struts debugging - one more time
I am not sure what is implied by the below messages: Using netbeans I am able to debug servlets debug jsp's (a little buggy but it works) debug action classes and form classes. I am not sure if this all works remotely or not. logging is always a good idea. Sandeep --- Kilmer, Erich [EMAIL PROTECTED] wrote: Hi Keith, Thanks for your reply. I do use already many of the techniques listed in your email as well as log4j. I do not have any problem catching errors in form and actions classes. I do have problem finding errors that come out of the html tags in JSPs. If there is a bad mapping and an html:form's action point to the mapping with a problem I do not see any errors in any of the logs. I have modified my error.jsp in hopes of seeing more but so far nothing. If I have better luck with this I will let the group know. Developing in Struts would be much faster if there was a way to diagnose such problems. Erich -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 8:54 AM To: Struts Users Mailing List Subject: Re: Question on Struts debugging - one more time I've not had better luck. I think it's the way it is. Here's how I do it - I'd like to know how others do. I use hundreds of log messages so I can trace the flow of my program. I make the method calls for logging easy to type - dbmd(a debug msg) or dbmw(warning message). I code traces into action classes from the start. to show the perform method starting ending so a dud struts config is found because the Action i expect to run doesn't log it's start. I check for null pointers all over the place log a warning or throw an exception for them. I constantly restart the server (tomcat 3.2.2) to make weird problems go away. Auto class reloading doesn't work properly so - I restart after every compile. I use these 3 methods in jsp's Action classes a lot, to check the contents of the session request - this finds things left in the session by mistake. public static void printSessionAttributeNames(String caller, HttpSession session) { public static void printRequestAttributeNames(String caller, HttpServletRequest request) { public static void printRequestParameters(String caller, HttpServletRequest request) { I've attached the code for them, someone may find them useful - the codes a bit dodgy old but it's easy to understand. I have my own logging code (from old servlet programming) but I want to use log4j (one day!) - You really need to be able to switch trace messages on/off without re-compiling classes or restarting the server. Only when it's quite reliable do I remove the messages. Often I just comment the mesages out in expectation it will go wrong in future. All in all a bit primitive compared to some (non-web) environments I've worked in. we're in the early days - things will get easier. We'll get informative/instructive messages that tell us what to do to put it right we'll be able to step thru our action classes in the debugger. Happy bug hunting! - Keith --- Kilmer, Erich [EMAIL PROTECTED] wrote: Thought I would give this one more try. Has anyone had better luck with debugging problems caused by say bad action mappings, ie: mis-named action classes, missing action forms etc. Currently when these problems are encountered I see no useful error messages in any of my logs (even when debug is set to 2). Is this just the way that it is or have I failed to do something? Thanks, Erich Sent previously: I have been using Struts for some time now. My app's Struts config file has almost 50 action mappings so I have been down this road a time or two. Many times when adding a new mapping I run into errors though. For example the latest on was where the mapping listed an action class called something like UserCreateAction (package removed). But when I wrote the class itself I named it UserAddAction. Now when I built the app and moved to the Orion apps server and ran it when I get to the JSP that references this action mapping I get a null exception. Typically I do not catch exceptions in a JSP and the uncaught exceptions go to my error JSP where it states that the exception is null. So I go into my web.xml file and change the debug param to 2. I also changed detail to 2. (By the way what does detail = 2 do?) Then I re-ran everything after rebuilding and re-deploying. The app still does the same thing. OK, fine now I go to check the logs. I check the apps server log where system outs go. I see no Struts messages except for the flurry of them at startup. I look at the log4j error logs and see nothing. I also looked at the apps servers application log where I see some Struts messages but see nothing about this error. So my Struts debugging question is this. Are errors encountered
Computer-programmer.org
Hi there, for those of you who have been trying to get to the struts tutorial at http://www.computer-programmer.org/articles/struts/ , it has been down for a while. I was having network issues that have since been resolved. It's back up now! tataryn:craig/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
forwarding back to the same action
As part of my logic for a generalized controller Action I've written, I want to forward back through the same action I came from if no local or global forward has been configured, in other words I want to go to the action (not the input jsp) Can someone tell me why the following code inside my perform method isn't working, and what I should be calling instead, or if there's something else I need to be doing to the new ActionForward object? ActionForward forward = new ActionForward(mapping.getPath(), true); Thanks, Bill Bohrer Athens Group, Inc. An employee owned consulting firm integrating technology strategy and software solutions. http://www.athensgroup.com [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Using the IMG tag dynamically
Hey guys, I must be missing something. I've got an ActionForm with a bean attribute item... which has an image name under a property.. say item.imageName. I would like to use the image tag to use this image dynamically.. html:img page=/images/myImage.gif alt=No Image Set./ works fine... but it's not dynamic.. surely this is trivial... but what am I missing? ..it would be neat if I could treat it like the html:text tag... and just reference the property.. html:text property=item.imageName.. but I can't see how to do that. Thanks, Jon -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Computer-programmer.org
Hi, It looks like a good tutorial but some of the slides do not load completely and others ar blurry. Thought you might want to know -Original Message- From: Craig Tataryn [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 13, 2002 12:31 PM To: [EMAIL PROTECTED] Subject: Computer-programmer.org Hi there, for those of you who have been trying to get to the struts tutorial at http://www.computer-programmer.org/articles/struts/ , it has been down for a while. I was having network issues that have since been resolved. It's back up now! tataryn:craig/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
case sensitive property names ??
Hi, i had the following case where another process calls an action in my application with a parameter in url named A. like: .../actions/process?A=1UNAME=andre I coded a form bean with a getA/setA pair, but it never gets called. if I use a in the call to the action, it works. however, getUNAME() and setUNAME() gets called from this portion of code in struts 1.0, I can see that property names are case sensitive: from PropertyUtils.getPropertyDescriptor(Object bean, String name): for (int i = 0; i descriptors.length; i++) { if (name.equals(descriptors[i].getName())) return (descriptors[i]); } Is this a standard requierments that parameter names must be case sensitive? even so, how can one populate a bean with single letter uppercase property names? Thanks for any inputs Andre -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Computer-programmer.org
Yeah, I know. It's weird. Almost like they are scambled. However, when I view them internally they look fine. I'll see if I can fix that, for now you can just download the .ppt file. Craig. Flashnet wrote: Hi, It looks like a good tutorial but some of the slides do not load completely and others ar blurry. Thought you might want to know -Original Message- From: Craig Tataryn [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 13, 2002 12:31 PM To: [EMAIL PROTECTED] Subject: Computer-programmer.org Hi there, for those of you who have been trying to get to the struts tutorial at http://www.computer-programmer.org/articles/struts/ , it has been down for a while. I was having network issues that have since been resolved. It's back up now! tataryn:craig/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
FreeBSD
Is anyone running Struts in a low-medium traffic site on a FreeBSD server? I'm curious as to how the JVM's are holding up and what servlet engine is being used. Thanks! Robert Anyone who has never made a mistake has never tried anything new. -- Albert Einstein -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: case sensitive property names ??
This has to do with the bean spec. And what you say is right. If you use all uppercase, it will leave the first letter alone, otherwise it will uppercase the first letter. And this would include your a example. Arron. Paradis, André wrote: Hi, i had the following case where another process calls an action in my application with a parameter in url named A. like: .../actions/process?A=1UNAME=andre I coded a form bean with a getA/setA pair, but it never gets called. if I use a in the call to the action, it works. however, getUNAME() and setUNAME() gets called from this portion of code in struts 1.0, I can see that property names are case sensitive: from PropertyUtils.getPropertyDescriptor(Object bean, String name): for (int i = 0; i descriptors.length; i++) { if (name.equals(descriptors[i].getName())) return (descriptors[i]); } Is this a standard requierments that parameter names must be case sensitive? even so, how can one populate a bean with single letter uppercase property names? Thanks for any inputs Andre -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: FreeBSD
My site's running red-hat linux, apache, tomcat, struts, using IBM's 1.3 VM ...if that's any interest to you :) And from what I hear FreeBSD's a little more efficient at running things than linux. Arron. Robert wrote: Is anyone running Struts in a low-medium traffic site on a FreeBSD server? I'm curious as to how the JVM's are holding up and what servlet engine is being used. Thanks! Robert Anyone who has never made a mistake has never tried anything new. -- Albert Einstein -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[ANNOUNCE] Scioworks Camino v1.0
We are pleased to announce the general availability of the Scioworks Camino v1.0, visual tool for Struts application development. Download is available at http://www.scioworks.com/scioworks_camino_download.html. --- Changes since v1.0-b2 (Build-011018): * User interface: * JSP files are shown in nested folders on Project Pane tree reflecting the actual directory structure * Shows input elements of a form on the Project Pane tree * MessagePane supports copying selected messages to clipboard * Features: * Supports DispatchAction * web.xml is taken into account in the project * New Project Wizard configures also web.xml * Supports both /do/* and *.do URI patterns for Actions (or other user defined patterns) * DTD information is maintained in struts-config.xml * Supports web document other than JSPs (e.g. *.html, *.htm) * JSPs * Improved supports of html:* tags in code generation and JSP conversion. Enhancement covers * html:select multiple * html:image * html:multibox * html:html locale=.. xhtml=.. * html:file * html:textarea * Improved Convert JSPs dialog * Storyboard * Auto Layout wizard to arrange nodes on the Storyboard * Auto-scrolls when user drags a node towards the edges * Auto-expands the canvas when a node is place closed to the edges * Drag on the empty space with CTRL key pressed will drag the canvas * Printing of Storyboard -- John Yu Scioworks Technologies e: [EMAIL PROTECTED] w: +(65) 873 5989 w: http://www.scioworks.com m: +(65) 9782 9610 Scioworks Camino - Rapid WebApp Assembly for Struts
Re: MessagesPresent tag
It's in the nightly builds. Are you using a nightly build (last few months) or Struts v1.0? David --- Pedone, Tim [EMAIL PROTECTED] wrote: I noticed a tag called messagesPresent in the logic tag docs http://jakarta.apache.org/struts/struts-logic.html#messagesPresent but got a Can't find tag lib error. Is this a future feature? I'm trying to use it to detect if there is an ActionError of a particular kind. I've got a form with personal info on it and if the user forgets a field, I want to detect that particular error and render the field label in red. I figured that I'd just look for the fieldName error that my ActionForm created. Thanks, Tim Pedone __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Returns from erroneous validation without aditional information
When I want to do something like this, I set validation=false in the struts-config.xml for the action. Then I can call validate on the ActionForm when appropriate. Or you can have two actions. One to prepopulate fields (with validation=false) and one with validation=true. David --- João_Guilherme_Del_Valle [EMAIL PROTECTED] wrote: Hi, Struts´ automatic validation seems to be very useful, centralizing validation logic. But I have a problem. My page has some aditional information in it, example: I´m updating a book, the page has all those fields about book name, ISBN and so. But I have some information about book volumes, that I set as attributes on the request when forwarding to the JSP. But when something goes wrong with the validation, control flow does not pass throught the Action class, so I can´t populate the request with the volume data. A solution would be populate the request int the validate method, but definitively this does not seem to be a interesting approach. Any other idea? João. Joao Guilherme Del Valle [EMAIL PROTECTED] Visionnaire Informática SA http://www.visionnaire.com.br Tel/Fax: +55 41 373-7400 r: 217 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
NEVER MIND (RE: forwarding back to the same action)
Never Mind! ;-) As soon as I sent this I realized it's not what I want to be doing - If there are no forwards found, I'll get into a dead loop. woops. Don't compute with the flu. =Bill -Original Message- From: William G. Bohrer [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 13, 2002 4:04 PM To: 'Struts Users Mailing List' Subject: forwarding back to the same action As part of my logic for a generalized controller Action I've written, I want to forward back through the same action I came from if no local or global forward has been configured, in other words I want to go to the action (not the input jsp) Can someone tell me why the following code inside my perform method isn't working, and what I should be calling instead, or if there's something else I need to be doing to the new ActionForward object? ActionForward forward = new ActionForward(mapping.getPath(), true); Thanks, Bill Bohrer Athens Group, Inc. An employee owned consulting firm integrating technology strategy and software solutions. http://www.athensgroup.com [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: iterate only showing one row -- newbie question
Thanks for your reply, I have checked out your nested:iterate and it looks very interesting. And for my problem, if you look in my jsp I have closed the iterate tag twice, this was why I was only printing out the last row of the resultSet and not all of them. Cheers! logic:iterate id=appInfoPick name=appInfo property=appInfoPicks/ this / shouldn't have been there. tr % Object obj1 = getServletContext().getAttribute(appInfo); System.out.println(IN iterate 1 + obj1.toString());% td align=left bean:write name=appInfoPick property=driverNumber / /td /tr /logic:iterate On Saturday, January 12, 2002, at 11:15 PM, Arron wrote: Wow, that's a lot of code there mate. :) I really do recommend using the nested extension for this. It's an exact fit for what you're trying to do. http://www.keyboardmonkey.com/strtus There's all the information you need to get running. Primer, tutorial if you need it, and stuff for the future. To put it bluntly... original struts iterate tags using nested objects is simply s--t. And to not use a nested bean creates s--t bean code. The nested extension will fix all that for you, and you'll end up with your JSP looking like this... Start JSP --== div align=center table cellspacing=1 cellpadding=10 border=1 bgcolor=#99 tr th align=center bean:message key=heading.playerTeamPick.number/ /th th align=center bean:message key=heading.playerTeamPick.driver/ /th th align=center bean:message key=heading.playerTeamPick.qualification/ /th th align=center bean:message key=heading.playerTeamPick.cost/ /th th align=center bean:message key=heading.playerTeamPick.pick/ /th /tr nested:iterate property=appInfoPicks / tr td align=left bean:write property=driverNumber / /td td align=left bean:write property=driver / /td td align=left bean:write property=startingPosition / /td td align=left bean:write property=driverPrice / /td /tr /nested:iterate /table /div ==-- End JSP ...it could be just me, but I think that the short-and-sweet aspect of such markup is truly compelling. And there's other things possible with it beside this application alone. And don't worry, the Nested Extension's destiny is to be in Struts itself, I'm just building up it's user base to get feedback and make it stronger before the developers commit it to Struts itself. You have a good nesting model happening. You understand that part, and that's the most important. Give it a try and get back to the group with how it goes. Arron. Team Gasoline wrote: Hi All -- The following iterate code only shows up as one row in my jsp. With the debug code I know that the arrayList is being populated with all the beans representing my resultSet. The row that appears seems to be the last row to be obtained. What is happening with the rest??? Thanks for your help! ... With System.out.println I have verified that the list in AppInfo contains the 9 different AppInfoPick beans. If I replace the bean:write tags in the iterate with just text or just the name of the bean without the property attribute, I expect that iterate should iterate through all objects in the list or print the text in rows equal to the ArrayList.size(), which does not happen, but I do get that one row. Also if I add a scope attribute to the bean:write tags I receive one row of null that's all. Thanks again! -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Bug in BeanUtils.populate()
It appears there is a bug in BeanUtils.populate() for an indexed setter of array type. It doesn't take into account that it is an indexed setter and that the second parameter is an array because it only checks the first parameter which is always an int for an indexed setter. This is the code in the 1.0.1 release: ... Class parameterType = parameterTypes[0]; if (parameterTypes.length 1) parameterType = parameterTypes[1]; // Indexed setter // Convert the parameter value as required for this setter method Object parameters[] = new Object[1]; if (parameterTypes[0].isArray()) { ... it should be as follows: ... Class parameterType = parameterTypes[0]; if (parameterTypes.length 1) parameterType = parameterTypes[1]; // Indexed setter // Convert the parameter value as required for this setter method Object parameters[] = new Object[1]; if (parameterType.isArray()) { ...
[I FIGURED IT OUT :-)] Digester Examples
Thanks for the info. I figured it out. I see the digester playing an incredible role in what I am doing. What an incredible tool! -Original Message- From: Phase Communcations [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 12, 2002 10:25 PM To: Struts Users Mailing List Subject: Digester Examples Does anyone know of some good concise digester examples and tutorials. I have been reading the docs but am unsure of several aspects of it. Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Execute Struts in Netbeans?
I have written a HOW-TO on this. You may want to read it first. www.michaelmok.com Michael Mok Product Manager FullyBooked 1306 Hay Street West Perth Western Australia 6005 Tel: 61 8 93221295 Fax: 61 8 94815281 Email: [EMAIL PROTECTED] www.fullybooked.com.au -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, 12 January 2002 10:41 To: [EMAIL PROTECTED] Subject:RE: Execute Struts in Netbeans? If you use Forte 3.0 CE (same as netbeans with a few extensions -- good web app extensions), running Struts apps is no problem. -Original Message- From: AJ Morris [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 4:14 PM To: [EMAIL PROTECTED] Subject: Execute Struts in Netbeans? Has anyone had luck executing struts-based applications in the Netbeans integrated Tomcat? Things are fine with the standalone Tomcat, but not the internal Tomcat. Here are the issues. Tomcat can't see the taglibs, but this is solved by mounting struts.jar. Tomcat will not execute action mappings, because it says the path is not valid. Tomcat cannot see my ApplicationProperties files, either. AJ Morris [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Bug in BeanUtils.populate()
BeanUtils works correctly in that if you want to set against an index, you can have the following forms. Quoted from the bean spec --== void setter(int index, PropertyType value); // indexed setter PropertyType getter(int index); // indexed getter void setter(PropertyType values[]); // array setter PropertyType[] getter();// array getter ...so it's either setting and getting an entire array collection, or directly setting and getting objects against an index which can mean absolutely anything internally to the bean. The BeanUtils class uses separate code blocks to handle both. Builds as of a few days ago will accept implementations of java.util.List as well as the primitive arrays the spec defines. I think the ones you're after are the array methods. Arron. It appears there is a bug in BeanUtils.populate() for an indexed setter of array type. It doesn't take into account that it is an indexed setter and that the second parameter is an array because it only checks the first parameter which is always an int for an indexed setter. This is the code in the 1.0.1 release: ... Class parameterType = parameterTypes[0]; if (parameterTypes.length 1) parameterType = parameterTypes[1]; // Indexed setter // Convert the parameter value as required for this setter method Object parameters[] = new Object[1]; if (parameterTypes[0].isArray()) { ... it should be as follows: ... Class parameterType = parameterTypes[0]; if (parameterTypes.length 1) parameterType = parameterTypes[1]; // Indexed setter // Convert the parameter value as required for this setter method Object parameters[] = new Object[1]; if (parameterType.isArray()) { ... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Bug in BeanUtils.populate()
The spec. supports the following: setFoo(int index, Object[] array) However, BeanUtils.populate() does not. The problem is that BeanUtils.populate() isn't checking if the second parameter is an array or not, it only checks the first parameter. However, the JavaBean spec. allows for the second paramter to be of an array type. If you try this, you will find that it doesn't work in struts1.0 or struts1.0.1 unless you make the change to the code that I suggested below. If you look at the code, the bug is very obivious. -Original Message- From: Arron Bates Sent: Sun 1/13/2002 11:31 PM To: Struts Users Mailing List Cc: Subject: Re: Bug in BeanUtils.populate() BeanUtils works correctly in that if you want to set against an index, you can have the following forms. Quoted from the bean spec --== void setter(int index, PropertyType value); // indexed setter PropertyType getter(int index); // indexed getter void setter(PropertyType values[]); // array setter PropertyType[] getter();// array getter ...so it's either setting and getting an entire array collection, or directly setting and getting objects against an index which can mean absolutely anything internally to the bean. The BeanUtils class uses separate code blocks to handle both. Builds as of a few days ago will accept implementations of java.util.List as well as the primitive arrays the spec defines. I think the ones you're after are the array methods. Arron. It appears there is a bug in BeanUtils.populate() for an indexed setter of array type. It doesn't take into account that it is an indexed setter and that the second parameter is an array because it only checks the first parameter which is always an int for an indexed setter. This is the code in the 1.0.1 release: ... Class parameterType = parameterTypes[0]; if (parameterTypes.length 1) parameterType = parameterTypes[1]; // Indexed setter // Convert the parameter value as required for this setter method Object parameters[] = new Object[1]; if (parameterTypes[0].isArray()) { ... it should be as follows: ... Class parameterType = parameterTypes[0]; if (parameterTypes.length 1) parameterType = parameterTypes[1]; // Indexed setter // Convert the parameter value as required for this setter method Object parameters[] = new Object[1]; if (parameterType.isArray()) { ... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] winmail.dat Description: application/ms-tnef -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]