Good afternoon. Faced such a moment. I have two servlets and 1 jsp page. From one servlet I transfer List with the data. On the jsp page, I pull out the data I need using jstl. It would seem that everything would be great if I did a servlet that would row them up and everything was on fire. But as it turned out. I can not pull them out. I tried to pull them using request.getParametr and request.getAttribute. Therefore, to you, dear formachane, 2 questions appeared. 1. Is it possible to transfer a list from jsp to servlet? 2. If not, how can I get the data I need?

I attach the page code.

<tr> <td>ID карты</td> <td><input type="text" name="id_card" value="${card.id_card}" disabled></td> </tr> <tr> <td>Старые номера</td> <td><input type="text" name="old_card" value="<c:out value="${card.old_card}"/>" disabled></td> </tr> 

At attempt to pull out these values ​​always returns NULL. Thank you in advance!

  • I did not find a way to transfer the entire list to the server at once. But I understood why I can not get the values ​​of these fields. The fact is that the disabled attribute prohibits the transfer of the values ​​of these fields to the server. - Andrey Sosnovsky
  • And you can not create a json-object with an array, and transfer it to the server? - Bakhuss
  • The fact is that I am not familiar with json yet. So I can't answer your question. But here it’s also the fact that there are 3 different sheets on the page. Which refer to different tables. Therefore, following the logic, you will most likely have to create 3 different JSON objects and then, on the server side, disassemble them. - Andrey Sosnovsky

1 answer 1

I did not find a way to transfer the entire list to the server at once. But I understood why I can not get the values ​​of these fields. The fact is that the disabled attribute prohibits the transfer of the values ​​of these fields to the server.