3 Replies Latest reply on Apr 13, 2008 4:24 AM by Roberto Urban

    Absolute URI cannot be resolved

    Peter Wendland Newbie

      Hi everyone!!

      I'm new to RichFaces Development, but want to use them in my current project.
      I downloaded the RichFaces samples from the RichFaces download page. I configured my project with the exact settings as in the sample project (I tried different ones) - I took the files 1:1 out of the sample project and placed them into the exact folders into my project.

      I put all files into a war-file, that works, but when I start the tomcat (5.5.26) and let it undeploy the war-file then I get following error messages:

      org.apache.jasper.JasperException: The absolute uri: http://labs.jboss.com/jbossrichfaces/ui/suggestionbox cannot be resolved in either web.xml or the jar files deployed with this application
       org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
       org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
       org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
       org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317)
       org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
       org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
       org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
       org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
       org.apache.jasper.compiler.Parser.parse(Parser.java:127)
       org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
       org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
       org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
       org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
       org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
       org.apache.jsp.index_jsp._jspService(index_jsp.java:49)
       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      


      It seems to me - no matter which RichFaces component I want to use - the specification cannot be loaded/ resolved. I don't have a clue what to do...

      Can anyone please help me???

      Thanks a lot in advance!
      Peter

        • 1. Re: Absolute URI cannot be resolved
          FRANCOIS Stéphane Newbie

          Hello, try to add this in your web.xml :

          <!-- Configuration de RichFaces -->
          <context-param>
          <param-name>org.ajax4jsf.SKIN</param-name>
          <param-value>blueSky</param-value>
          </context-param>
          <context-param>
          <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
          <param-value>com.sun.facelets.FaceletViewHandler</param-value>
          </context-param>
          <context-param>
          <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
          <param-value>false</param-value>
          </context-param>
          <context-param>
          <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
          <param-value>NEKO</param-value>
          </context-param>
          <context-param>
          <param-name>org.richfaces.LoadStyleStrategy</param-name>
          <param-value>ALL</param-value>
          </context-param>

          <filter-name>richfaces</filter-name>
          <filter-class>org.ajax4jsf.Filter</filter-class>

          <filter-mapping>
          <filter-name>richfaces</filter-name>
          <servlet-name>Faces Servlet</servlet-name>
          REQUEST
          FORWARD
          INCLUDE
          ERROR
          </filter-mapping>

          • 2. Re: Absolute URI cannot be resolved
            Peter Wendland Newbie

            Thanks for the advice, but it didn't work. Here's my web.xml:

            <?xml version="1.0"?>
            <web-app version="2.4"
             xmlns="http://java.sun.com/xml/ns/j2ee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
            
             <display-name>a4jEchoText</display-name>
            
             <context-
             <param-name>org.richfaces.SKIN</param-name>
             <param-value>#{skinBean.skin}</param-value>
             </context-param>
            
             <context-param>
             <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
             <param-value>server</param-value>
             </context-param>
            
             <context-param>
             <param-name>org.ajax4jsf.SKIN</param-name>
             <param-value>blueSky</param-value>
             </context-param>
            
             <context-param>
             <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
             <param-value>com.sun.facelets.FaceletViewHandler</param-value>
             </context-param>
            
             <context-param>
             <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
             <param-value>false</param-value>
             </context-param>
            
             <context-param>
             <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
             <param-value>NEKO</param-value>
             </context-param>
            
             <context-param>
             <param-name>org.richfaces.LoadStyleStrategy</param-name>
             <param-value>ALL</param-value>
             </context-param>
            
             <context-param>
             <param-name>javax.faces.CONFIG_FILES</param-name>
             <param-value>/WEB-INF/faces-config.xml</param-value>
             </context-param>
            
             <filter>
             <display-name>RichFaces Filter</display-name>
             <filter-name>richfaces</filter-name>
             <filter-class>org.ajax4jsf.Filter</filter-class>
             </filter>
            
             <filter-mapping>
             <filter-name>richfaces</filter-name>
             <servlet-name>Faces Servlet</servlet-name>
             <dispatcher>REQUEST</dispatcher>
             <dispatcher>FORWARD</dispatcher>
             <dispatcher>INCLUDE</dispatcher>
             </filter-mapping>
            
             <listener>
             <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
             </listener>
            
             <!-- Faces Servlet -->
             <servlet>
             <servlet-name>Faces Servlet</servlet-name>
             <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
             <load-on-startup>1</load-on-startup>
             </servlet>
            
             <!-- Faces Servlet Mapping -->
             <servlet-mapping>
             <servlet-name>Faces Servlet</servlet-name>
             <url-pattern>*.jsf</url-pattern>
             </servlet-mapping>
            
             <login-config>
             <auth-method>BASIC</auth-method>
             </login-config>
            </web-app>
            


            This is the faces-config.xml:
            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE faces-config PUBLIC
             "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
             "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
            
            <faces-config>
             <managed-bean>
             <managed-bean-name>suggestionBox</managed-bean-name>
             <managed-bean-class>org.richfaces.SuggestionBox</managed-bean-class>
             <managed-bean-scope>session</managed-bean-scope>
             </managed-bean>
             <managed-bean>
             <managed-bean-name>skinBean</managed-bean-name>
             <managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
             <managed-bean-scope>session</managed-bean-scope>
             </managed-bean>
            </faces-config>
            


            index.jsp:
            <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
            <html>
            <head></head>
            
            <body>
             <jsp:forward page="/pages/index.jsf"/>
            </body>
            </html>
            


            /pages/index.jsp:
            <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
            <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
            <%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/suggestionbox"
             prefix="rich" %>
            <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
            
            <html>
            <head>
             <title></title>
            </head>
            
            <body>
            <f:view>
            
            <a4j:outputPanel ajaxRendered="true">
             <h:messages />
            </a4j:outputPanel>
            
            <h:form id="suggestionbox_form">
            <h:selectOneRadio binding="#{skinBean.component}" />
            <h:commandLink action="#{skinBean.change}" value="set skin" />
            
            <br/>
            <br/>
            
            <h:outputText
             value="Simple richfaces Suggestion Box test web application."
             style="font: 18px;font-weight: bold;"/>
            <br/>
            <br/>
            
            <h:panelGrid columns="4" border="0" style="border: 1px solid black;">
             <f:verbatim>Suggestion Box will suggest you Town's names if it's started with the "a" or
             "A" letter</f:verbatim>
            
             <f:facet name="header">
             <f:verbatim>Input With Suggestion Feature</f:verbatim>
             </f:facet>
            
            
             <f:verbatim> </f:verbatim>
             <h:panelGroup>
             <h:inputText value="#{suggestionBox.property}" id="text"/>
             <rich:suggestionbox id="suggestionBoxId" for="text"
             rules="#{suggestionBox.rules}"
             suggestionAction="#{suggestionBox.autocomplete}" var="result"
             fetchValue="#{result.text}"
             first="#{suggestionBox.intFirst}"
             minChars="#{suggestionBox.minchars}"
             shadowOpacity="#{suggestionBox.shadowOpacity}"
             border="#{suggestionBox.border}"
             width="#{suggestionBox.width}"
             height="#{suggestionBox.height}"
             shadowDepth="#{suggestionBox.shadowDepth}"
             cellpadding="#{suggestionBox.cellpadding}"
             usingSuggestObjects="#{suggestionBox.usingSuggestObjects}">
            
             <a4j:ajaxListener type="org.richfaces.AjaxListener"/>
             <h:column>
             <h:outputText value="#{result.text}"/>
             </h:column>
             <h:column>
             <h:outputText value="#{result.price}">
             <f:convertNumber pattern="#,##.00" type="currency"/>
             </h:outputText>
             </h:column>
             </rich:suggestionbox>
             </h:panelGroup>
            
             <h:inputText value="#{suggestionBox.property}" id="text1">
             <rich:suggestionbox id="suggestionBoxId1" tokens=",["
             rules="#{suggestionBox.rules}"
             suggestionAction="#{suggestionBox.autocomplete}" var="result"
             fetchValue="#{result.text}"
             first="#{suggestionBox.intFirst}"
             minChars="#{suggestionBox.minchars}"
             shadowOpacity="#{suggestionBox.shadowOpacity}"
             border="#{suggestionBox.border}"
             width="#{suggestionBox.width}"
             height="#{suggestionBox.height}"
             shadowDepth="#{suggestionBox.shadowDepth}"
             cellpadding="#{suggestionBox.cellpadding}"
             usingSuggestObjects="#{suggestionBox.usingSuggestObjects}">
            
             <a4j:ajaxListener type="org.richfaces.AjaxListener"/>
             <h:column>
             <h:outputText value="#{result.text}"/>
             </h:column>
             <h:column>
             <h:outputText value="#{result.price}">
             <f:convertNumber pattern="#,##.00" type="currency"/>
             </h:outputText>
             </h:column>
             </rich:suggestionbox>
             </h:inputText>
            </h:panelGrid>
            
            <br/>
            <br/>
            
            <h:panelGrid columns="3" border="0" style="border: 1px solid black;">
            
             <f:verbatim>Border</f:verbatim>
             <f:verbatim> </f:verbatim>
             <h:selectOneRadio value="#{suggestionBox.border}" onchange="submit()">
             <f:selectItem itemLabel="1" itemValue="1"/>
             <f:selectItem itemLabel="2" itemValue="2"/>
             <f:selectItem itemLabel="3" itemValue="3"/>
             </h:selectOneRadio>
            
             <f:verbatim>Width</f:verbatim>
             <f:verbatim> </f:verbatim>
             <h:selectOneRadio value="#{suggestionBox.width}" onchange="submit()">
             <f:selectItem itemLabel="150" itemValue="150"/>
             <f:selectItem itemLabel="200" itemValue="200"/>
             <f:selectItem itemLabel="250" itemValue="250"/>
             <f:selectItem itemLabel="300" itemValue="300"/>
             <f:selectItem itemLabel="350" itemValue="350"/>
             </h:selectOneRadio>
            
             <f:verbatim>Height</f:verbatim>
             <f:verbatim> </f:verbatim>
             <h:selectOneRadio value="#{suggestionBox.height}" onchange="submit()">
             <f:selectItem itemLabel="100" itemValue="100"/>
             <f:selectItem itemLabel="150" itemValue="150"/>
             <f:selectItem itemLabel="200" itemValue="200"/>
             <f:selectItem itemLabel="250" itemValue="250"/>
             <f:selectItem itemLabel="300" itemValue="300"/>
             </h:selectOneRadio>
            
             <f:verbatim>Shadow Depth</f:verbatim>
             <f:verbatim> </f:verbatim>
             <h:selectOneRadio value="#{suggestionBox.shadowDepth}" onchange="submit()">
             <f:selectItem itemLabel="3" itemValue="3"/>
             <f:selectItem itemLabel="4" itemValue="4"/>
             <f:selectItem itemLabel="5" itemValue="5"/>
             <f:selectItem itemLabel="6" itemValue="6"/>
             </h:selectOneRadio>
            
             <f:verbatim>Shadow Opacity</f:verbatim>
             <f:verbatim> </f:verbatim>
             <h:selectOneRadio value="#{suggestionBox.shadowOpacity}" onchange="submit()">
             <f:selectItem itemLabel="1" itemValue="1"/>
             <f:selectItem itemLabel="2" itemValue="2"/>
             <f:selectItem itemLabel="3" itemValue="3"/>
             <f:selectItem itemLabel="4" itemValue="4"/>
             <f:selectItem itemLabel="5" itemValue="5"/>
             <f:selectItem itemLabel="6" itemValue="6"/>
             <f:selectItem itemLabel="7" itemValue="7"/>
             <f:selectItem itemLabel="8" itemValue="8"/>
             <f:selectItem itemLabel="9" itemValue="9"/>
             </h:selectOneRadio>
            
             <f:verbatim>Cellpadding</f:verbatim>
             <f:verbatim> </f:verbatim>
             <h:inputText value="#{suggestionBox.cellpadding}" onchange="submit()" />
            
             <f:verbatim>Onsubmit function will return</f:verbatim>
             <f:verbatim> </f:verbatim>
             <h:selectOneRadio value="#{suggestionBox.onsubmit}" onchange="submit()">
             <f:selectItem itemLabel="true" itemValue="true"/>
             <f:selectItem itemLabel="false" itemValue="false"/>
             <f:selectItem itemLabel="no function" itemValue="none"/>
             </h:selectOneRadio>
            
             <f:verbatim>Using Suggestion Objects</f:verbatim>
             <f:verbatim> </f:verbatim>
             <h:selectBooleanCheckbox value="#{suggestionBox.usingSuggestObjects}" onchange="submit()" />
            
            </h:panelGrid>
            </h:form>
            </f:view>
            </body>
            </html>
            


            ...any further ideas?

            • 3. Re: Absolute URI cannot be resolved
              Roberto Urban Newbie

              Hi Peter,
              try to substitute http://labs.jboss.com/jbossrichfaces/ui/suggestionbox with http://richfaces.org/rich.

              I use it in my projects and all work fine

              Hope this help

              Cheers
              Roberto