Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将用一个例子来解释我的问题。在我的 JSP 页面中,表单有成对的输入元素来输入员工的名字和姓氏。可以有很多员工。我需要将这些带有员工的名字和姓氏映射到Form bean中的一个List或任何一个。CollectionList 或任何其他集合可能具有具有属性“firstName”、“lastName”的值对象。这在 struts 1.2 中可行吗?如果可能的话,我该怎么做?任何示例代码或有用的链接将不胜感激。
List
Collection
这可以在 Struts 中通过使用索引和映射属性来处理。
请参阅文档中的说明:索引属性、映射属性和索引标签。