0

您好,我正在尝试以最少的代码更改将我的应用程序从 WAS 6.0 迁移到 WAS 8.5。我的应用程序是用 WAS8.5 不支持的 JSF 1.1 编写的。我也写了它的 getter 和 setter。此应用程序在 WAS6.0/6.1 中运行良好,但在 WAS8.5 中运行时显示异常。我必须在我的项目中添加所有的罐子,这样它才能工作。我收到以下异常:

javax.el.ELException: Property 'InfoController' not found on type com.ui.InfoTemplate javax.faces.el.EvaluationException: javax.el.ELException: Property 'InfoController' not found on type com.ui.InfoTemplate
at org.apache.myfaces.el.convert.ValueExpressionToValueBinding.getValue(ValueExpressionToValueBinding.java:169)
at com.utilities.JsfUtility.getManagedBean(JsfUtility.java:107)
at com.ui.LandingPageController.getInfo(LandingPageController.java:92)

Caused by: javax.el.ELException: Property 'InfoController' not found on type com.ui.InfoTemplate
at org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:127)

Caused by: javax.faces.el.EvaluationException: Property 'InfoController' not found on type com.ui.InfoTemplate
at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:80)

Caused by: javax.el.PropertyNotFoundException: Property 'InfoController' not found on type com.ui.InfoTemplate
at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:232)
at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:209)
4

1 回答 1

2

你有一个 EL 语法错误。异常消息表明您有类似的东西

public class InfoTemplate {

    public InfoController getInfoController() {
        return infoController;
    }

}

并且您正在尝试以以下方式访问该属性InfoController

#{infoTemplate.InfoController}

这是错误的。属性名称不以 2 个或更多大写字母开头时,必须以小写字母开头。

#{infoTemplate.infoController}

我不确定它在旧的 WAS 版本中是如何工作的。它应该在那里以同样的方式失败。

于 2014-08-27T12:04:06.447 回答