Trying to learn my way into writing a web app with J2EE, and I've run into a BIG roadblock. I've been learning the necessary html as I go along. I was delighted to find out that for a situation where I have 2 frames on a page, I could have 2 separate forms in the code, each with a submit button targeted to the frame I want to go to for that action. Put them on the page inside a table with a cell for each form and submit. Looked the way I wanted it to, 2 buttons at the top for the user to choose from, and it worked. Then later I added a 3rd cell and form and submit button, this one calls a servlet on the server that simply updates the database behind it all. No need to make any html to come back to the client.
But when I added the 3rd form and submit to the frame, using exactly the same table structure, just a 3rd cell with the 3rd submit, suddenly there's no form data going back to the server. When I realized it was the 3rd one that made the difference, I went back and forth between 2 versions of the code -- one with 2 form+submit, the other with 3. I can see it with my own eyes, right there -- with 2 it works, form data goes back with the request, with 3, nothing goes back and I get NullPointerExceptions in the servlet code.
I even did a little test servlet that simply checks with an if statement whether there are any parameters returned with the request. That, too, showed that with 2 there are parameters in the request, with 3 there are none.
What???
But when I added the 3rd form and submit to the frame, using exactly the same table structure, just a 3rd cell with the 3rd submit, suddenly there's no form data going back to the server. When I realized it was the 3rd one that made the difference, I went back and forth between 2 versions of the code -- one with 2 form+submit, the other with 3. I can see it with my own eyes, right there -- with 2 it works, form data goes back with the request, with 3, nothing goes back and I get NullPointerExceptions in the servlet code.
I even did a little test servlet that simply checks with an if statement whether there are any parameters returned with the request. That, too, showed that with 2 there are parameters in the request, with 3 there are none.
What???