a********n 发帖数: 369 | 1 一个jsp页面里的语句,看不懂
${packageSearch.models['packageColumnHeader'].packageColumnHeaderList}
请问以上这个语句是什么意思呢?调用packageSearch里面的models方法?在页面里没
有看到定义
packageSearch,是说这是个javabean?刚刚上班学了两天jsp,实在是不明白,请大家
指点啊!啥
都不会,工作压力好大…… | h**********c 发帖数: 4120 | 2 大牛都不答,
俺来说说,
首先看看EL(EXPRESSION LANGUAGE)方面的知识,其次搞懂servlet,
总之,是scwcd方向的东东. | g*****g 发帖数: 34805 | 3 packageSearch is a bean available in your jsp context, typically put by your
web framework mapping a page. models is a map containing the dynamic data,
packageColumnHeader is a key name in the map, packageColumnHeaderList is a
field in the instance for the value that mapped to packageColumnHeader key
class PackageSearch{
Map models;
}
class PackageColumnHeader {
PackageColumnHeaderList packageColumnHeaderList;
}
models.put("packageColumnHeader", new PackageColumnHeader());
class BlahServlet {
PackageSearch packageSearch = new PackageSearch();
} | a********n 发帖数: 369 | 4 谢谢!
【在 h**********c 的大作中提到】 : 大牛都不答, : 俺来说说, : 首先看看EL(EXPRESSION LANGUAGE)方面的知识,其次搞懂servlet, : 总之,是scwcd方向的东东.
| a********n 发帖数: 369 | 5 太谢谢啦!明白多了!
your
data,
a
key
【在 g*****g 的大作中提到】 : packageSearch is a bean available in your jsp context, typically put by your : web framework mapping a page. models is a map containing the dynamic data, : packageColumnHeader is a key name in the map, packageColumnHeaderList is a : field in the instance for the value that mapped to packageColumnHeader key : class PackageSearch{ : Map models; : } : class PackageColumnHeader { : PackageColumnHeaderList packageColumnHeaderList; : }
|
|