Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP

2009-05-08 Thread SofIAm
That's great! I'll look into that. Thanks again. Jim Kiley wrote: The checkstyle, FindBugs, or PMD plugin does this for sure. On Thu, May 7, 2009 at 8:50 PM, Dave Newton newton.d...@yahoo.com wrote: SofIAm wrote: Thank YOU ALL! What a dumb JAVA 101 mistake! I was never populating the

Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP

2009-05-08 Thread satyanarayana katta
Take a close look at your getAllEmployees()method. You have declared the list with same name myList, which is a local variable. You need to either call setList and pass this or use the samelist. public String getAllEmployees() { //remove the ListString ListString

Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP

2009-05-08 Thread SofIAm
You're correct. That was exactly the problem. Thanks for responding! satyanarayana katta wrote: Take a close look at your getAllEmployees()method. You have declared the list with same name myList, which is a local variable. You need to either call setList and pass this or use the

Please help! Struts 2/Eclipse - List Object is not displaying in JSP

2009-05-07 Thread SofIAm
Hi Everyone, I'm new to Struts. Please help me figure out why the List myList is not being displayed in JSP, although my String variable s is displayed. Your help will be greatly appreciated! Thanks! Here's the code: struts.xml ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC

Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP

2009-05-07 Thread Lukasz Lenart
2009/5/7 SofIAm sof.am...@yahoo.com:        public String getAllEmployees() { This method is never called, renamed it to execute() and should be ok Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail:

Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP

2009-05-07 Thread Jim Kiley
Even then it won't be OK. The OP is declaring myList as a local variable in getAllEmployees(), so getMyList won't return it. Change the line ListString myList = new ArrayListString(); in getAllEmployees() to just be myList = new ArrayListString(); and do as Lukasz suggests and you should be OK.

Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP

2009-05-07 Thread Timothy Orme
This is actually not correct, he defined the method as getAllEmployees in his struts.xml That said, I'm not sure of the default behavior of the s:property tag. Have you tried something like s:property value=top? I'm not huge on the struts tag libs, but this would be the first place I'd look,

Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP

2009-05-07 Thread Timothy Orme
Ah good catch, this is whats causing it. Although as I said, you dont need to rename the method if you've setup your struts.xml as it is. Jim Kiley wrote: Even then it won't be OK. The OP is declaring myList as a local variable in getAllEmployees(), so getMyList won't return it. Change the

Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP

2009-05-07 Thread SofIAm
Thank YOU ALL! What a dumb JAVA 101 mistake! I was never populating the class member variable myList, but the local one in my method, unintentionally of course. DUH!!! It's working like a charm! Thanks again! Timothy Orme wrote: Ah good catch, this is whats causing it. Although as I

Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP

2009-05-07 Thread Dave Newton
SofIAm wrote: Thank YOU ALL! What a dumb JAVA 101 mistake! I was never populating the class member variable myList, but the local one in my method, unintentionally of course. DUH!!! It's working like a charm! Thanks again! There is a warning available in Eclipse to notify you when a

Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP

2009-05-07 Thread Jim Kiley
The checkstyle, FindBugs, or PMD plugin does this for sure. On Thu, May 7, 2009 at 8:50 PM, Dave Newton newton.d...@yahoo.com wrote: SofIAm wrote: Thank YOU ALL! What a dumb JAVA 101 mistake! I was never populating the class member variable myList, but the local one in my method,