• Post Reply Bookmark Topic Watch Topic
  • New Topic

Inputbox value printing

 
David Walsh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone give me a tiny snippet of code that will print the value of a bean property as the VALUE of the inputbox?
I've tried:
<input type="text" value="<jsp:getProperty name="selfEmp" property="department_ID" />">
And it didn't seem to work. Maybe be a problem with other code. Please let me know.
Thank you.
 
Shankar Narayana
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Example:
<jsp:useBean id="dataBean" scope="request" class="beans.DataBean"/>
Now use
<input type="text" name="field1" value="<%=dataBean.getField1()%>">
Hope this solves ur problem
shankar
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!