File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes not fetching values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "not fetching values" Watch "not fetching values" New topic
Author

not fetching values

Megha Singhal
Ranch Hand

Joined: Feb 28, 2012
Posts: 225

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

Joined: Jan 10, 2002
Posts: 61766
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Megha Singhal
Ranch Hand

Joined: Feb 28, 2012
Posts: 225

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
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

It's impossible to say anything useful without seeing the HTML which sends the request to your Edit servlet.
Megha Singhal
Ranch Hand

Joined: Feb 28, 2012
Posts: 225

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
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

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

Joined: Feb 28, 2012
Posts: 225

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
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

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

Joined: Feb 28, 2012
Posts: 225

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
 
subject: not fetching values