我正在使用 spring-web-mvc 开发我的应用程序...
现在在我的控制器上它返回如下:
public class InterfacesManageController implements Controller {
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
Map<String, Object> myModel = new HashMap<String, Object>();
myModel.put("interfacesList", this.interfacesSecurityProcessor.findByAll(0, null, null, null));
return new ModelAndView("common", "model", myModel);
}
现在,我的 JSP 包含以下代码:
<c:forEach items="${model.interfacesList}" var="prod">
<c:out value="${prod.id}"/> <c:out value="${prod.name}"/><br><br>
</c:forEach>
现在,当我在有 tomcat 6.0.20、ognl 2.6.11 的 Windows 平台上执行此操作时,它会给出我想要的确切输出:
117 eth1
118 eth1
119 eth0
但是,当我在具有 tomcat 5.5 的 unix(cent os)平台上部署 war 文件时,ognl 表达式不会被执行并给我如下输出:
${prod.id} ${prod.name}
谁能有解决方案,ognl表达式版本和tomcat版本应该是什么问题?
提前致谢...