读取属性文件中的值并在JSP里头调用

来源:百度知道 编辑:UC知道 时间:2024/05/09 09:21:48
public class BranchServiceImpl implements BranchService {

private final static List<String> branches = new ArrayList<String>();
static{
branches.add("S000");
branches.add("2800");
branches.add("2700");
branches.add("2600");
branches.add("1400");
branches.add("1300");
branches.add("1200");
}

Properties props = null;

public BranchServiceImpl(Properties props){
this.props = props;
}
public List<String> getAllBranches() {
return branches;
}
}
每个branches都有对应的值
比如S000=>ALL
2800=>2600,2700,2800
等,都已经写入属性文件
请问要如何在JSP中实现从属性文件里头读出并返回所有VALUE

Enumeration<?> propertyNames()
返回属性列表中所有键的枚举,如果在主属性列表中未找到同名的键,则包括默认属性列表中不同的键。
------------------------------------------
你查查API···都有!!!