The function “xxxx” must be used with a prefix when a default namespace is not specified
Myeclipse中当报错(以我的实验为例):
The function getNewsid must be used with a prefix when a default namespace is not specified
即如果未指定默认命名空间,则函数getNewsid必须与前缀一起使用。
我jsp界面里有这句话
<td id="${news.getNewsid}">
将其改为
<td id="${news.newsid}">
发现运行成功,没有报错。
总结:JSP表达式语言(EL)通过getter访问属性.所以你不应该使用getter,而只需要使用属性的名称:newsid.