First off, I apologize for posting twice in one day. I'm new to MyFaces and
am struggling a bit with initial configuration. I pulled in some samples and
am tweaking them for my own needs, but things don't seem to be working.
Basic MyFaces and Tomahawk elements work fine, but any time I try to use a
component from the extensions or sandbox libraries, I get a "500" error
saying the uri cannot be resolved. I *think* I have all the jars and that my
web.xml is OK, but clearly something is wrong. What I would really like to
do is get the Dojo components from the sandbox working. I'm using Tomcat 5.5
(bundled with Exadel studio in Eclipse).

I would really appreciate it if someone could get me going in the right
direction here.


Here's what I've got:

------------------------------
exception message
-----------------------------
javax.servlet.ServletException: The absolute uri:
http://myfaces.apache.org/sandbox cannot be resolved in either web.xml or
the jar files deployed with this application
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)

org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)

org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)

org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)


------------------
WEB-INF/lib
------------------
ajax4jsf.jar
commons-beanutils-1.7.0.jar
commons-codec-1.3.jar
commons-collections-3.1.jar
commons-digester-1.6.jar
commons-el-1.0.jar
commons-fileupload.jar
commons-lang-2.1.jar
commons-logging-1.0.4.jar
commons-validator-1.2.0.jar
jstl-1.1.0.jar
myfaces-api-1.1.5.jar
myfaces-impl-1.1.5.jar
ojdbc14.jar
oro-2.0.8.jar
oscache-2.3.2.jar
portlet-api.jar
struts.jar
tomahawk-1.1.3.jar

--------------
WEB.xml
--------------

<?xml version="1.0"?>
<!--
 * Copyright 2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * UPDATED: Marty Hall changed to use .faces suffix,
 *          faces-config.xml filename, and servlets 2.4.
 *          See tutorial at http://www.coreservlets.com/JSF-Tutorial/.
 *          Note: uncomment the filter entries at the bottom
 *                to use Tomahawk extended components.
-->

<web-app 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";
    version="2.4">
         
    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>
            /WEB-INF/faces-config.xml
        </param-value>
        
        </context-param>


    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>


    </context-param>

    <context-param>
        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
        <param-value>true</param-value>


    </context-param>

    <context-param>
        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
        <param-value>true</param-value>


    </context-param>

    <context-param>
        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
        <param-value>false</param-value>
    </context-param>

    <context-param>
        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
        <param-value>true</param-value>

    </context-param>

    <!-- Listener, that does all the startup work (configuration, init). -->
    <listener>
       
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>

    <!-- Faces Servlet
         Marty Hall: changed .jsf back to standard of .faces -->
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
    </servlet-mapping>

    <!-- Welcome files -->
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>


  <filter>
        <filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
        <param-name>maxFileSize</param-name>
        <param-value>20m</param-value>
    
    </init-param>
</filter>


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


<!-- extension mapping for adding <script/>, <link/>, and other resource
tags to JSF-pages  -->
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>*.faces</url-pattern>
</filter-mapping>

<!-- extension mapping for serving page-independent resources (javascript,
stylesheets, images, etc.)  -->
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
    
    
</web-app>


-------------------------------------------------------------------------------
jsp.page (straight from Matthias Wessendorf's example)
-------------------------------------------------------------------------------

<%@ taglib uri="http://java.sun.com/jsf/core";  prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
<%@ taglib uri="http://myfaces.apache.org/sandbox"; prefix="s" %>


<HTML>
    <HEAD> <title>Facility Form</title> 
        <LINK REL="STYLESHEET" HREF="css/215style.css">
        </HEAD>
    <body bgcolor="white" >

<f:view>
  <s:dojoInitializer require="dojo.widget.Editor"/>
  <h:form>
    <h:inputTextarea id="editarea2" styleClass="dojo-Editor"
value="#{dojo$editor.input}"/>
    <h:commandButton action="#{dojo$editor.publish}" id="submitted"
value="[Weg damit]"/>
  </h:form>
</f:view>


</body>
</html>



-- 
View this message in context: 
http://www.nabble.com/newbie-configuration-question-on-extensions-sandbox-inclusion-tf3344218.html#a9301122
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to