Forums Register Login

List pointer value is getting printed instead of data

+Pie Number of slices to send: Send
Hi,

I've the below DAO File.



And the below Servlet



Here i'm trying to print the first value (caseNumber) in a jsp textbox using the below code.



But the output i getting is as below



but instead of this i need the exact value at there. please let me know where am i going wrong and how do i fix it.

Thanks,
Sunny
+Pie Number of slices to send: Send
Are you meant to display just the first item or all the records in the list?

If the latter, better to use the <c:foreach> to loop through the list.
1
+Pie Number of slices to send: Send
Why use toString() rather than a getter (accessor) that gives you the value that you want?
+Pie Number of slices to send: Send
 

K. Tsang wrote:Are you meant to display just the first item or all the records in the list?

If the latter, better to use the <c:foreach> to loop through the list.



Hi Tsang, I don't want to retrieve all the values, i want only the first value to be retrieved.
+Pie Number of slices to send: Send
 

Bear Bibeault wrote:Why use toString() rather than a getter (accessor) that gives you the value that you want?



Hi Bear,

Thanks for this tip. I did it (using below) and got the result as expected.



Thanks Again
:beerchug:
I found some pretty shells, some sea glass and this lovely tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 691 times.
Similar Threads
not selecting values from database
jdbc CRUD Operations - Getting Null Pointer Exception
Displaying the right details of a resource taken from a JSP results page
Problem in displaying multiple search results
ResultSet problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:25:24.