8 Replies Latest reply on May 20, 2009 10:26 AM by ilya_shaikovsky

    Error 404: No target servlet configured for uri: /a4j.res/or

      Hi - I am trying to use a4j:commandButton to submit a form but I see that the form is not getting submitted....after some debugging I found out that I am getting A4J undefined javascript error. and with the help of FireBug, i found the root cause to be below...

      Error 404: No target servlet configured for uri: /a4j.res/org.ajax4jsf.framework.ajax.AjaxScript.faces

      As u can see the path generated is relative to the current page but not starting from the webapp context root...i.e. the correct path should be /context-root/ a4j.res/org.ajax4jsf.framework.ajax.AjaxScript.faces

      The same richfaces jars are generating proper urls in another application...any hints will be appreciated. tx

      
      
      <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
       pageEncoding="ISO-8859-1"%>
      
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
      
      <html>
      
      <head>
      <title>Create New User</title>
      </head>
      
      <body>
      <f:view>
       <h:form>
       <rich:panel style="width:50%">
       <h:panelGrid columns="2">
       <h:inputText id="id" value="#{user.id}">
       <h:outputLabel for="id" value="Id: " />
       </h:inputText>
       <h:inputText id="name" value="#{user.name}">
       <h:outputLabel for="name" value="Name: " />
       </h:inputText>
       <h:inputText id="age" value="#{user.age}">
       <h:outputLabel for="age" value="Age: " />
       </h:inputText>
       <h:outputText id="result" value="#{user.result}"/>
       <a4j:commandButton value="Add User" type="submit" reRender="result"
       actionListener="#{user.addUser}" />
       </h:panelGrid>
       </rich:panel>
      
       </h:form>
      </f:view>
      </body>
      </html>