Home >Web Front-end >HTML Tutorial >How does jsp pass the list to the background_html/css_WEB-ITnose
The problem is more complicated. First, the background passes a list to the front desk. The front desk needs to take a part of the list. This part includes several attributes of the list and a list it contains, and the included list also contains a list, now I want to pass this part to the backend, please tell me how to get this part of the data from the backend. .
I don’t even understand your logic. When describing the problem like this, you can add some code to assist the description
Moreover, you can use descriptions like list1, list2, and list3. You are all just lists, which is really difficult to get around.
I don’t know much about jsp, I just want to comment on the way you describe the problem.
Struts can convert object into json and then pass it to the front desk. The front desk can also convert the data into json and send it to the backend
#1
< input type="text" value="${ehrsVar.serial}"/>
The page code is like this , this part of the content needs to be sent to the background for storage, and then the background will send it to the front desk. healthInfoSubList is a list in the background, and healthInfoSubList.catalogs is the list included in healthInfoSubList. To pass the above values to the background on another page, I don’t know how to pass them together to the background.
You can use json. First re-encapsulate the list you want to pass to the front-end in the background (that is, parse it into a new list), and convert the list into json format and convert it into a string and send it to the front desk. After the front desk gets the string you passed (var json='<%=jsonString%>'), it converts it into json format through eval(json), and then traverses it. You can get the data you want.