• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

making textbox fields null after submit

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friends,
i've solved my prob with JavaWebServer2.0 , anyway, some of ur suggestions to my previous post
were worth learning .
I did my assignment in Servlet successfully , in the sense of addition of new records with JDBC.
But after i say submit in the form (.html), how come i can make those entries null ?
One soln is to using PrintWriter
using that have code like
pw.println(" ....html code ");
make a form like prev html has .
But then am i supposed to hardcode, starting from html , body , form name tag ?
ur addtional suggestions r always welcome !
from ,
vikram .
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use a template system for this. Imagine you have a HTML file on your disk, and in each of the form fields you have something like VALUE="%address2%". To send the page from the servlet, read through it and substitute each %something% with whatever value is appropriate.
You can either write your own template processor (a basic one is quite easy, just an excercise in using StringTokeizer or StreamTokenizer) or use one of the available open source projects like WebMacro http://www.webmacro.org or FreeMarker http://freemarker.sourceforge.net/
 
There's a way to do it better - find it. -Edison. A better tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic