This week's book giveaway is in the NodeJS forum.
We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line!
See this thread for details.
Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Load MySQL column value in JSP textarea  RSS feed

 
Ranch Hand
Posts: 102
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi people,
I have some jsp pages that I get and load data by servlet, but I'm have problems to load mysql collumn value to an textarea. I get the value of textarea and write in mysql ok.
This is textearea that I get data and load in MySQL:

This is tag that I load MySQL column value to textarea:

This is my servlet to load data to my jsp:

I don't receiving any error.

Thanks in advance.
 
Marshal
Posts: 67255
170
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What debugging have you already done?

Have you verified that the if statement at line 1 is triggering?

Have you verified that a value for the "prontuario" request parameter is being returned? The name "prontuario" does not appear in your HTML examples. So what is it?

Have you verified that the histConsulta list has more than zero entries?

And so on...
 
Cezar Apulchro
Ranch Hand
Posts: 102
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear, thank you by replay.
"prontuario" is a key to access record in my DB.
"histConsulta" are returning all of my request.setAttribute.
To test I have used "System.out.println(historico)" and was dysplayed the content that I have in DB.
My project is a maven project, are there diference, because I have openned this same question for this same problem and coderanch told me to use "String" in histConsulta and are working fine.
 
Cezar Apulchro
Ranch Hand
Posts: 102
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I again,
all request.setAttribute are work fine except for "historico".
 
Rancher
Posts: 3986
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all the other setAttributes are working, and you see the value of historico in your logs, then where are you not seeing the output?
Assuming it is in the browser, can you show the code that is supposed to display that value?
 
Cezar Apulchro
Ranch Hand
Posts: 102
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I changed my tag div of historico including the value field and now the textarea are showing db collumn value.
This is a new tag div:

Problem solved.
Thank you.
 
I will suppress my every urge. But not this shameless plug:
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!