I have two list box first list box is showing State.On clicking the state the value in the second box is changing according to state.But when i am selecting the second list box value and submitting the value its showing null value.
Please help me how to solve this problem.
My Jsp Page;
and second jsp page which acting like java script file
So the second select box has a name of "select"? Is there a "select" property in your action? (That's not a very specific name--it might be better in the long run to name it something meaningful.)
When posting code examples it's best to limit the posted code to only the code directly related to the problem. It's difficult to wade through 125 lines of HTML just to find the 5-10 lines of the state select box and ajax tag.
Joined: Oct 07, 2008
ok,Next time i will post the limited code.
But still i am getting the null value even i created the setter and getter in action class.
The usual way to check if the parameter is getting passed is using a tool like HttpHeaders, Firebug like David has mentioned.
Other than that (as I think your is a get request) you should be able to see the parameters being passed in the URL itself (The URL once you click the submit button) Check to see if the parameters are getting passed there.
(In case of post a simple trick is to temporarily change the method to get - to see if the parameters being passed are correct. Of course if its Ajax there is no option but to fall back on Firebug and any http sniffer)