Problem with Return Value
Hello:
I抦 new to Java/JSP/Struts development.
In an application I抦 working on, I have a requirement to construct a JSP to display info about team members as line items. But I would not know the member count until I query the DB (which is done by a standalone method 揼etMembers?and the code is in try-catch-finally blocks).
In 揼etMembers?I have the code as?br>
{
try
{
匘B connection & ResultSet code here?br>
匓ased on record count匨ember[] mbr = new Member[recCount]
While(ResultSet.next())
{
Mbr[ResultSet.getRow()].setMbrFName = ResultSet.getString(揊NAME?;
}
Catch()
Finally()
Return mbr;
}
So, the problem is, I抦 getting an error msg. saying the return variable is not declared anywhere, which is probably due to 搈br?being inside the 搕ry?block. But if I want to declare it outside the block as Member[] mbr = new Member();, I get an error saying I have to include the array size which at this point I would not know.
Are there any suggestions as to how I can return 搈br?without any errors?
Thanks and any input is greatly appreciated.

