This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JSP and the fly likes reading a form field. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "reading a form field." Watch "reading a form field." New topic
Author

reading a form field.

BalaKishore Pamarti
Greenhorn

Joined: Jul 26, 2005
Posts: 5
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

Joined: Jan 10, 2002
Posts: 63350
    
  70

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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reading a form field.
 
It's not a secret anymore!