Re: struts2 show question

2009-04-20 Thread Dave Newton
red phoenix wrote: then I modify struts action,like following: List testList=this.getHibernateTemplate().find(" select col1,col2 from mytable"); request.setAttribute("testList",testList); return SUCCESS; the action dispatch to the same jsp,but this time,the jsp s

Re: struts2 show question

2009-04-20 Thread Jim Kiley
Oh heck I misread your code there. This is Struts 1 and not Struts 2, isn't it? Sorry about that. jk On Mon, Apr 20, 2009 at 12:08 PM, Jim Kiley wrote: > Have you tried writing a unit test to ensure that testList is populated > after your action executes? I'm pretty sure you'll find that it i

Re: struts2 show question

2009-04-20 Thread Jim Kiley
Have you tried writing a unit test to ensure that testList is populated after your action executes? I'm pretty sure you'll find that it isn't. It looks to me like you're declaring testList to be a local variable within your action method (you're doing "List testList = " instead of "testList = ").

struts2 show question

2009-04-20 Thread red phoenix
I have a table named mytable,it has two cols,col1 and col2,the data are col1 col2 --- John 24 Kate 18 hibernate xml file is follows: Then I user struts2 to get the data by following statement: List testList=this.getHibernateTemplate().find(" from myta