Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

not fetching values

 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my following codes i am fetching the values from the database with corresponding checkbox in each row , i am not able to print the checked value on the next page

following is select.java this is working

following is edit.java which is not working

when i am reaching on edit.java its returning null values
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See my reply in your other topic on the subject of properly structuring web apps.

You should also consider properly indenting your HTML code to make it more readable.
 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:See my reply in your other topic on the subject of properly structuring web apps.

You should also consider properly indenting your HTML code to make it more readable.


may be the code is not readable but atleast see once its not too complicated.
see the problem is i am not able to fetch checked data to other page.
please see that where i am doing wrong.
 
Paul Clapham
Sheriff
Pie
Posts: 20188
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's impossible to say anything useful without seeing the HTML which sends the request to your Edit servlet.
 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:It's impossible to say anything useful without seeing the HTML which sends the request to your Edit servlet.

followingi just want to know the following code in Edit.java, if i disable rest of the code that why it is returning null value
 
Paul Clapham
Sheriff
Pie
Posts: 20188
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're asking why the value of "id[j]" is null, well, clearly that's because



returns null. In other words, because the request didn't contain a parameter with that name.
 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:If you're asking why the value of "id[j]" is null, well, clearly that's because



returns null. In other words, because the request didn't contain a parameter with that name.

but "check" is the name of checkbox which i give in Servlet.java and then fetching checkbox values, and also this code is working in jsp..
i don't know why it is creating prob in servlet.
 
Paul Clapham
Sheriff
Pie
Posts: 20188
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If "check" is the name of the checkbox then it shouldn't be surprising that parameters named "check0", "check1", and so on aren't in the request.
 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:If "check" is the name of the checkbox then it shouldn't be surprising that parameters named "check0", "check1", and so on aren't in the request.


you can see my code above in the Select.java, from this i am fetching values in the Edit.java but it is returning null values.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic