I am displaying a list in my JSP as shown below:
<%@page contentType="text/html;charset=UTF-8"language="java"pageEncoding="UTF-8"%>
<%@taglib prefix="s"uri="/struts-tags"%>
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>xxx</title>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<s:form name="tableForm"method="post">
<th>
<s:submit action="verify" key="Add"></s:submit>
</th>
<s:hidden name="propagateList" value="%{formList}"/>
<table border="1">
<tr>
<th >ID</th>
<th>Name</th>
<th>Status</th>
<th>Type</th>
<th>System</th>
</tr>
<s:iterator value="formList">
<tr>
<td><s:checkbox name="checked" fieldValue="%{#attr.ID}" theme="simple" ></s:checkbox>
</td>
<td><s:property value="NAME"/></td>
<td><s:property value="STATUS"/></td>
<td><s:property value="TYPE"/></td>
<td><s:property value="UNIT"/></td>
</tr>
</s:iterator>
</table>
</s:form>
</body>
</html>
Here I want to pass the list formList to another action when I click on Add button without having to hit the database to fetch the list formList once again.
I tried using <s:hidden name="propagateList" value="%{formList}"/>
but it does not work.
This list contains more than 1000 records , so is there any way to pass this list from the jsp to another action in Struts 2 without using session?