jsf中的<h:inputtext>的validator =“”属性导致异常</h:inputtext>

时间:2010-04-07 07:50:38

标签: jsf

我们正在尝试从WS5迁移到WAS7,并且jsf代码导致以下错误

原始例外:

Error Message: JSPG0227E: Exception caught while translating /jsp/listView/listViewUPD_MAP_UM01.jsp: JSPG0301E: Invalid attribute, validator, for deferred method returning void. 
Error Code: 500
Target Servlet: /jsp/listView/listViewUPD_MAP_UM01.jsp
Error Stack: 
com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /jsp/listView/listViewUPD_MAP_UM01.jsp: 
     JSPG0301E: Invalid attribute, validator, for deferred method returning void. 
     at com.ibm.ws.jsp.translator.visitor.generator.BaseTagGenerator.evaluateAttribute(BaseTagGenerator.java:527) 

2 个答案:

答案 0 :(得分:3)

有类似的问题,从WAS6.1迁移到WAS7.0:

例外:

com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /RegisterName.jsp:  
    JSPG0301E: Invalid attribute, validator, for deferred method returning void.
        at com.ibm.ws.jsp.translator.visitor.generator.BaseTagGenerator.evaluateAttribute(BaseTagGenerator.java:527)

RegisterName.jsp片段:

<h:inputText
    id="callerName" 
    size="50"
    value="#{callerSC.currentCaller.name}"
    required="true" 
    validator="#{callerSC.validateCallerName}" 
    converter="StringTrimmer"
    onchange='return setFocusOn(this, "nextButton");'
>
        </h:inputText>

获得提示,将以下代码段包含在我的jsp页面中

<%@ page isELIgnored="false" deferredSyntaxAllowedAsLiteral="false"%>

为我工作,例外消失了

替代方法是将以下代码段添加到web.xml中以指定JSP的el-ignored = false

<jsp-config>                                                            
<jsp-property-group>                                                    
<url-pattern>*.jsp</url-pattern>                                        
<el-ignored>false</el-ignored>                                          
</jsp-property-group>                                                   
</jsp-config>                   

答案 1 :(得分:0)

从WebSphere 6.2迁移到WebSphere 8.5.5时,我们遇到了严重的问题

<%@ page isELIgnored="false" deferredSyntaxAllowedAsLiteral="false"%>就像魅力一样。

但是更改web.xml至少不适用于WebSphere 8.5.5