C
canoe414
Greetings all,
I've crafted a servlet named insert_stuff with both doGet and doPost
methods like so:
doGet( .....) {
......................build webpage containing a form named
insert_stuff
}
doPost(....) {
....................standard read-form-insert-fields-into-database code
....................doGet( request, response);
}
The first time the user goes to the webpage .../insert_stuff ie.
with no parameter doGet is executed and the page with the form is
built and displayed. Good so far.
Filling the form and clicking Submit causes doPost to be executed, the
data does get inserted into the database BUT the page and empty form
do not get rebuilt and displayed, as if the doGet called from within
doPost is commented out.
To further muddy the waters, the servlet works perfectly when the form-
handling code is commented out, as in an empty form in a newly-built
page is displayed .
Any ideas/suggestions/pointers to code snippets are all appreciated.
TIA,
Steve
I've crafted a servlet named insert_stuff with both doGet and doPost
methods like so:
doGet( .....) {
......................build webpage containing a form named
insert_stuff
}
doPost(....) {
....................standard read-form-insert-fields-into-database code
....................doGet( request, response);
}
The first time the user goes to the webpage .../insert_stuff ie.
with no parameter doGet is executed and the page with the form is
built and displayed. Good so far.
Filling the form and clicking Submit causes doPost to be executed, the
data does get inserted into the database BUT the page and empty form
do not get rebuilt and displayed, as if the doGet called from within
doPost is commented out.
To further muddy the waters, the servlet works perfectly when the form-
handling code is commented out, as in an empty form in a newly-built
page is displayed .
Any ideas/suggestions/pointers to code snippets are all appreciated.
TIA,
Steve