Note that there are some explanatory texts on larger screens.

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

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload