Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reading a form field.

 
BalaKishore Pamarti
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this might be very trivial...

i am trying to read the values entered in textboxes which are created dynamically in the jsp as say....

<INPUT type="text" name=txtSample<%=count%> >

if count assumes the values 1 thru 10...i am not able to read the values in the textboxes using request object in my servlet...

request.getParameter("txtSample1"); is returning null.

any pointers...

TIA,
Kishore
---
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once the JSP is sent to the browser, do a View Source and make sure that the HTML is well-formed and what you expect.

Once mistake I can see is that you are not quoting the name attribute. This can cause subtle problems.
[ February 06, 2006: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic