473,385 Members | 1,256 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

fetching database values into a textarea with jsp page

hi
i have a problem about to fetch the value into the textarea with jsp page which contains characters and symbols also

there is one textarea tag field on my jsp form and i want to retrieve value for that textarea tag field from mysql database.
same if i use <input type...> tag then all is well done but is problems with only textarea tag.
what to do for retrieve the value ..?
plz help me.
with regard
Mar 1 '12 #1

✓ answered by r035198x

You put the value between the text area tag

Expand|Select|Wrap|Line Numbers
  1. <textarea name='textAreaName' id='textAreaId'>
  2. <c:out value="${variableWithTheValue}"/>
  3.  
  4. </textarea>

9 13154
r035198x
13,262 8TB
You put the value between the text area tag

Expand|Select|Wrap|Line Numbers
  1. <textarea name='textAreaName' id='textAreaId'>
  2. <c:out value="${variableWithTheValue}"/>
  3.  
  4. </textarea>
Mar 1 '12 #2
hi ro35198x thankx for ur quick response.
actually i am beginner in java with jsp so i need to create one profile editing form where some input, textarea, and some dropdown fields are there and want to retrieve value from mysql database for that fields.
now plz can u give me one demo example then i think i will be get right way to code .
plz r035198x
with regard
Mar 1 '12 #3
r035198x
13,262 8TB
Use JSF as explained here:http://docs.oracle.com/javaee/6/tutorial/doc/bnadp.html
Mar 1 '12 #4
i am using mysql database for this .
then how to do that ?
Mar 1 '12 #5
r035198x
13,262 8TB
You write a data access layer that connects to the database to give you back the results.
The easiest way is to use JPA/Hibernate because then you don't have to write any SQL and your code should work on any database.
If JPA is not an option then write write your own data access layer using JDBC which returns DTOs that you use in your JSPs' backing beans.
Mar 1 '12 #6
sir i am beginner all these things which u r suggest me i can't understand there is any easy way ?
or if possible then plz send me one demo example which is use to retrieve database value from mysql with jsp form.
or like edit profile code.
plz.
Mar 1 '12 #7
r035198x
13,262 8TB
You need to spend time reading about all these things that you need to use before writing the application then.
Here is a useful blog for JSF: http://balusc.blogspot.com/2008/10/e...d-sorting.html
Mar 1 '12 #8
ya u r right r035198x.
and r035198x i use ur suggested syntax for value retrieve and it's work perfectly ,
thank you very much .
plz suggest me what to do best practice for jsp programmer i like to work in it.
and finally i retrieve the values so i am very happy.
again thanks but one more problem is there what about dropdown box how to retrieve values on form from mysql....?
best regard
Mar 1 '12 #9
r035198x
13,262 8TB
Generally you should prefer developing web applications with JSF/Facelets these days according to the EE6 spec.

You display select options using a <c:foreach tag that loops through a collection of objects. In the loop you create the select options and display them, something like

Expand|Select|Wrap|Line Numbers
  1. <select name="selectName"> 
  2.    <c:forEach var="listItem" items="${list}" >
  3.      <option value="${listItem.id}"> 
  4.           <c:out value="${listItem.name}" />
  5.      </option>
  6.    </c:forEach>
  7. </select>  
Mar 1 '12 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: narshe | last post by:
I haven't come across an elegant way to do this yet, and would like to know what other people have come up with. There are two tables: CREATE TABLE EmployeeStatus ( pkId int not null primary...
2
by: George G. | last post by:
Hi there, I hope I am posting to the correct news group. What would be a good way to deal with null database values using ADO.NET. My SQL queries sometimes return null values when I have left...
0
by: satishr23 | last post by:
Hi, I am trying to parse the contents of a PHP page from the web which requires me to authenticate. I guess the way to do this is to make my program login to the login page,grab the cookie and...
1
by: katta.naveenkumar | last post by:
Hi friends My name is naveen kumar katta .My task is insert database values to pdf template with editable mode plz help me frieds.using ASP.NET I am giveing ex: step 1:
1
by: phanimadhav | last post by:
actually i want to present the sqlserver values to pdffile and HTML Formats. Actually i did the database values presented in XML format.But i don't know how to present the database values to PDF and...
2
by: elangobala | last post by:
HI I have a problem in the page. In my page i m having two text boxes and two drop down list box.when i select a value in first drop down it gets a appropriate value for it in the second...
1
by: beaker | last post by:
Access Database-driven ASP page with embedded RSS feeds Hi, I know very little about web development in general - just some basic html scripting, CSS and a bit of XML. I've inherited a public...
2
by: ghjk | last post by:
In my web page there is a table for displaying database values. For one column displays connected or Disconnected. If the database values is Disconnected i want to display the value in red color. How...
7
by: Surag | last post by:
Hello Guys, I have a datbase with userid,username and password. I Need to display database values in textboxes say for eg(Name and password) and redirect to login page based on the UserID please...
0
by: Sumprit Purabi | last post by:
Hi, everyone. I am using java swing. Till now I could able to display database values in a JTable by executing a query. Now, what i needed is that i have to place two buttons(PREVIOUS,NEXT) one...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.