Sorry. I posted the wrong reply at the wrong place.
Sorry to disturb you again.
ok, there's no problem.
Eric, I assumed that you use servlet/jsp and bean, that was my fault...
Please, look at the code below - all set once again:
1) Country.java ( located in '
Test' package)
2) CountryMethod.java ( in 'Test' package, too )
3) RetrievePage.jsp
and let me put some remarks...
to pt.1
why population is stored as
String? Don't you think that any numerical
type will be much better (for further calculations for example...)
to pt.2
in your original code (CountryMethod.java) the RetrieveData() method
does not return any data due to void at method signature...do you agree?
my implementation returns ArrayList, data is generated 'by hand',
so, please replace my code with yours to physically read data from db.
And of course add the rest of required stuff...
to pt.3
if you want to display this data, you have to create object
of CountryMethod class, then to call RetrieveData() method, right?
this method returns ArrayList object, so simply iterate through items
and print them out...
please, try to run my code 'as-is', then add whatever you need...
regards,
Natasza
[ November 18, 2006: Message edited by: Natasza Biecek ]