现在有一个aaa.properties文件,内容格式xxx=yyy,现在要将xxx都取出来绑定到struts2的下拉列表中?我的代码是这样的:
<%@ include file="../bas/common.jsp"%>
<HTML><HEAD><TITLE></TITLE></HEAD>
<%
  List list=new ArrayList();
  Properties p=new Properties();
  p.load(new FileInputStream(new File("D:\\aaa.properties")));
  Iterator it=p.entrySet().iterator();
  while(it.hasNext()){
  Entry e=(Entry)it.next();
  list.add(e.getKey());
  }
  request.setAttribute("bbb",list);
%>
<BODY style="color:white;background-color: #3B548F" onload="loadselect();"><!-- onload="DoSearch();"-->
<s:form id="frmSearch" name="frmSearch" action="/mainservlet" target="right_frame" cssStyle="width:100%">
<s:select id="tempselect" label="模板名" labelposition="top" name="demandtype" cssStyle="background-color:#fff3e6;width:100%"
list="#{<%=request.getAttribute("bbb") %>}"></s:select> 
<s:submit type="image" name="SearchBtn" value="查询" onclick="DoSearch()" src="../resources/images/Search_CHN.gif" cssStyle="width:73" />
<s:hidden name="operationId" value="TempOperation" />
</s:form>
</BODY>
</HTML>希望各位了解这方面知识的大侠看看我错在哪里了?谢谢了