Good afternoon. I'm trying to create an application (JSP, MYSQL, CSS) where after the user has correctly logged in, he is directed to a page where he can choose from two select fields, information that will be retrieved from the database and then assembled in a 3rd page, where on this page the user can enter values (information) that will be added to the database. This information is mounted in a table and in this table, in addition to the data retrieved from the database, 10 inputs are added so that these values (information) are sent to the database, after clicking on a button (submit) to save.
Now the questions:
1 - Is it possible to have 2 ResultSet (one to retrieve the data that came from the previous page and another to count the number of records in that table)?
2 - Assuming that the question above is positive, with the number of students, it is possible to create a for loop so that each entry of the table created on the 3rd page for each of the 10 values can be stored in an array (of String or int) and then sent to a last page that will show the result (positive if it managed to persist in the bank or negative if there was a problem)? Here is the structure of the application:
index.jsp
--- receives user login data
--- ok, go to login.jsp
login.jsp
--- sets up 2 select's fields for the user to select bank information
--- sends this information to abreClasse.jsp
openClass.jsp
--- assembles a table with the information passed from the select fields
--- In the table, "input" fields are also created for the data that will be persisted in the database
--- send this information to saveNotes.jsp
saveNotes.jsp
--- tries to persist the data in the database
--- if so, it gives a success message and other options to exit, edit
--- if not, it gives an error message and gives the option to redirect to the beginning of the process (login.jsp)
I have a link to an image of how the table looks after being assembled in the file abreClasse.jsp (with the selection of the select's fields) image link -->(
https://flic.kr/ps/42dmnJ). If necessary, I can send the files. The problem is that the way it is (as I did) the values are going with a null value, for the last page. Thanks in advance.