Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Get values from a textarea  RSS feed

 
Ann Toh
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
can anybody tell me how to get the values in a textarea. I have copy my codes as below:
<form method="get" action="/SQLassignment/RetrieveServlet">
<textarea rows="10" cols="80" name"sqlField"></textarea>
<br>
<input type="submit" value="Submit Query" name="submitQuery">
</form>
Thanx in advance
 
himanshu patel
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use method,
String textAreaValue = request.getParameter("sqlField");
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are aware that you are missing an '=' sign?
... name="sqlField" ...
[ January 22, 2004: Message edited by: David O'Meara ]
 
Ann Toh
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi himanshu patel,
i have use method to get the value, but it return a null when there is some values in the textarea... so is there other methods to get the values??
Thank in advance
 
Ann Toh
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David O'Meara,
Thank for your help. I didn't notice the "=" sign....
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope it solved your problem?
Sometimes it just takes a second set of eyes
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!