Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data Retrieval problem from db to jsp.

 
Geo Joseph
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
Im stuck with a problem, seeking your assistance. The situation is i have a link, when i click on the link a action is called, which in turn calls its respective action mapping(jsp page). All this works fine without any error. Now the only problem is when the user clicks on the link the jsp page is getting displayed, instead of displaying the result nothing is showing up. That is no data is shown. This is my code.

when the user clicks the link the action class is called. Im getting a resultset and i'm storing the resultset in a arraylist

and in the result set im just calling it as

And in jsp page im retrieving it as--


Can anybody help me here in this regard, i appreciate your kind help on this matter.
regards,
Geo J.
 
Geo Joseph
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I managed to solve the problem, bit too early to post must say. The problem was in the resultset i was doing something like list.add(mf);
instead it should had been list.add(getData(resultset));
and most importantly i messed up here, this should had been--
httpservletrequest.setAttribute("list", list);
instead of mf in place of list.
regards,
Geo J.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic