struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SofIAm <sof.am...@yahoo.com>
Subject Re: Please help! Struts 2/Eclipse - List Object is not displaying in JSP
Date Thu, 07 May 2009 16:21:16 GMT

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 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 line
>> "List<String>
>> myList = new ArrayList<String>();" in getAllEmployees() to just be
>> "myList =
>> new ArrayList<String>();" and do as Lukasz suggests and you should be OK.
>> jk
>> 
>> On Thu, May 7, 2009 at 11:57 AM, Lukasz Lenart
>> <lukasz.lenart@googlemail.com
>>> wrote:
>> 
>>> 2009/5/7 SofIAm <sof.amato@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: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Please-help%21-Struts-2-Eclipse---List-Object-is-not-displaying-in-JSP-tp23429087p23430437.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message