wood burning stoves 2.0*
The moose likes JSP and the fly likes request.getParameter() not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "request.getParameter() not working" Watch "request.getParameter() not working" New topic
Author

request.getParameter() not working

sony sa
Greenhorn

Joined: Sep 02, 2004
Posts: 3
hi
i am using the following code



next,first,last,previous are buttons on my form.
and on all the button clicks i am calling one javascript function as follows:


but the navigation is not working properly.
for the first time the default record is coming, but when i click
any button of above mentioned the last record is only coming,
as in the coding it is the first condition to be checked

can anyone help in this matter
i dont know exactly where i am going wrong

thanks
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
just remove all the else from your scriplet then you will get only the first record

because i think none of your buttons are null.
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Am I right in thinking that irs is a JDBC ResultSet? Does the i mean it's an instance variable? If so, are you sure it's not a FORWARD_ONLY ResultSet (the default). If it is then you can't go backwards. That may be your problem.

Jules
sony sa
Greenhorn

Joined: Sep 02, 2004
Posts: 3
i have code like this



its working properly for first and last
but not for next and previous
thanks
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
It's not very clear from the code you've given what might be going wrong. For example, do your debug prints come out in the response to indicate the correct statement block was entered? What happens if you click the last button and then the first button? Have you tested Adeel's hypothesis that the button parameters are never null? Are you sure that the names on your form buttons are actually what you think they are?

Jules
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: request.getParameter() not working
 
Similar Threads
Servlet not able to retrieve the values from jsp form
Servlet help
Null vs empty string
delete session with button
Not able to access hidden fields in servlet