• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to set a value into a textarea with EL?  RSS feed

 
chrstian ferma
Ranch Hand
Posts: 72
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

<textarea rows="5" name="name" value="<c:out value="${n.name} "/>" maxlength="100"></textarea>

the value in text area is not working it dont have any display when i run but this one is working on textbox thanks :)
 
chrstian ferma
Ranch Hand
Posts: 72
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
done
solution this should be
<textarea rows="5" name="name" maxlength="100">
${n.name}
</textarea>
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Explanation:

The value in a TEXT HTML control is initialized by the "value=" attribute of the tag.

The value in a TEXTAREA HTML control is initialized by the body content of the tag. TEXTAREA does not have a "value" attribute.

An HTML lint checker should point this out, but the rule when clients render HTML is that unrecognized items are silently ignored, so the faulty tag would simply not work and no error would be seen.
 
chrstian ferma
Ranch Hand
Posts: 72
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for a clear explanation it took me hours to fix this
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because JSP is a template to create HTML, the rules of HTML do not change when using JSP.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!