【发布时间】:2011-03-18 08:04:48
【问题描述】:
在我的 struts2 应用程序中,我有一个类似这样的 struts2 标签复选框列表
<s:checkboxlist name="yourSelect" label="Are You Inteterested In"
list="communityList" value="defaultSelect" />
我在我的动作类构造函数中添加了列表元素
查看纯副本到剪贴板打印?
public CustomerAction()
{
communityList = new ArrayList<String>();
communityList.add("WebSpere Consultuing");
communityList.add("Portal Consulting");
communityList.add("SOA/BPM Consulting");
communityList.add("Content Management");
}
public CustomerAction() { communityList = new ArrayList(); communityList.add("WebSpere 咨询"); communityList.add("门户咨询"); communityList.add("SOA/BPM 咨询"); communityList.add("内容管理"); }
而且我可以很好的显示在jsp页面上,
但问题是当我在 web.xml 中调用 jsp 页面时
<welcome-file-list>
<welcome-file>/pages/Customer.jsp</welcome-file>
</welcome-file-list>
列表未填充,当我从其构造函数具有列表值的类的 struts.xml 请求操作名称时,列表正在填充p>
如何将 web.xml 中的操作名称作为欢迎列表文件调用,而不是在 url 中键入操作名称.....
【问题讨论】:
标签: struts2