wood burning stoves 2.0*
The moose likes Servlets and the fly likes how to get an editable text field in a servlet( out.println) statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to get an editable text field in a servlet( out.println) statement" Watch "how to get an editable text field in a servlet( out.println) statement" New topic
Author

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

Moieen Khatri
Ranch Hand

Joined: Nov 27, 2007
Posts: 144
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

Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

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?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Moieen Khatri
Ranch Hand

Joined: Nov 27, 2007
Posts: 144
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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42906
    
  69
"<%=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

Joined: Nov 27, 2007
Posts: 144
Hi Ulf,

The issue got resolved with your statement!!!

Many Thanks

Moieen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get an editable text field in a servlet( out.println) statement