Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

how to get an editable text field in a servlet( out.println) statement

 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I have a situation where i need to show a prepopulated text field which should be editable in a servlet. This editable text area should then be saved in to an oracle table.
Can someone please help me as to how can I implement this.

Thanks

 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you been though this? Its a good place to start.

If you have what part are you stuck on? What have you got so far?
 
Moieen Khatri
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written this code but cannot get the value of the variable in the text field:



The value printed in the text field is <%=name%> but the value of the String owner variable should be printed

Please can some point out where I am making mistake?

Thanks
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"<%=name%>" is JSP notation, but you're not using JSP. Any anyway, the name of your variable is "owner", not "name". Try this:

out.println("<input type='text' name='owner' value='"+owner+"'>");
 
Moieen Khatri
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,

The issue got resolved with your statement!!!

Many Thanks

Moieen
 
You will always be treated with dignity. Now, strip naked, get on the probulator and hold this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic