2014-08-27 77 views
0

嗨我正在嘗試將我的應用程序從WAS 6.0遷移到WAS 8.5,並且代碼更改最少。我的應用程序是用WAS8.5不支持的JSF 1.1編寫的。我也寫過它的getter和setter。此應用程序在WAS6.0/6.1中運行正常,但在WAS8.5中運行時顯示異常。所有Jars我必須添加在我的項目中,以便它能夠工作。我收到以下例外情況:javax.el.PropertyNotFoundException:找不到類型爲com.ui.InfoTemplate的屬性'InfoController'

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) 
+0

可以在堆棧跟蹤中對包/類名稱進行混淆處理,但只要你還是新來的東西,因此在編輯它們的時候很容易就可以毫不留情地引入新的錯誤,那麼你絕對應該在空白沙箱項目,以便您可以將代碼/堆棧跟蹤**未修改**複製到問題中。堆棧跟蹤本身就代表了整個答案(我們只需要通俗地翻譯堆棧跟蹤)。如果您在代碼或堆棧中編輯一個小東西但卻未經實際測試就以錯誤的方式進行跟蹤,那麼答案可能會完全消失。 – BalusC 2014-08-27 12:29:52

回答

1

您有EL語法錯誤。異常消息表明,你已經像

public class InfoTemplate { 

    public InfoController getInfoController() { 
     return infoController; 
    } 

} 

而且你正在試圖訪問屬性爲InfoController

#{infoTemplate.InfoController} 

這是不對的。當屬性名稱不以2個或更多的首字母開頭時,必須以小寫字母開頭。

#{infoTemplate.infoController} 

我不確定它是如何在舊的WAS版本中工作的。它應該在那邊以相同的方式失敗。

+0

嗨,在我的jsp頁面中,我調用了''並且在我的課程中: public class PersonalInfoTemplate {0} {private String memberName =「」; // getters and membername } – 2014-08-27 12:25:57

+0

該參數調用'getMemberName()',而不是'getInfoController()'。 – BalusC 2014-08-27 12:26:55

相關問題