[jboss-user] [JBoss Portal] - portlet with ajax4jsf1.1.1 problem

jackyluck do-not-reply at jboss.com
Sun Nov 25 03:04:37 EST 2007


I try Ajax(Ajax4jsf1.1.1) function with jsf and portlet ,I don't konw why it have a error of jsp page when click the button of jsp page  ,the error is :

Request error,status:500 (/404 )internal Server error

and the server log error is :

2007-11-25 11:34:25,968 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/ajaxTest2].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
java.lang.ClassCastException: org.apache.catalina.core.ApplicationContextFacade cannot be cast to javax.portlet.PortletContext
	at com.sun.faces.portlet.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:64)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:239)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
	at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

1.below is my web xml :


          <display-name>Ajax4jsf Filter</display-name>
          <filter-name>ajax4jsf</filter-name>
          <filter-class>org.ajax4jsf.Filter</filter-class>
          
          <filter-mapping>
          <filter-name>ajax4jsf</filter-name>
          <servlet-name>Faces Servlet</servlet-name>
          REQUEST
          FORWARD
          INCLUDE
          </filter-mapping>

2.below is my jsp :
          <h:form>   
                <h:inputText id="test" value="#{managebean.info}">
                         <a4j:support event="onkeyup" reRender="test3"/>
                </h:inputText>
                
                 
                   
                       
                         <a4j:commandButton id="dd"   value="Ajax button">
                              <a4j:support action="#{managebean.pring}" event="onclick" reRender="test3"/>
                          </a4j:commandButton>
                       
                   
                 
        
           </h:form>
        </f:view>
    
3.I add ajax4jsf-1.1.1.jar and ajax4jsf-protlet-1.1.1.jar


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107554#4107554

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107554



More information about the jboss-user mailing list