• 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

not fetching values

 
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 28175
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28175
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28175
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic