Announcement Announcement Module
Collapse
No announcement yet.
Error caused by: java.io.FileNotFoundException:*/*.xhtml Not Found in ExternalContext Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error caused by: java.io.FileNotFoundException:*/*.xhtml Not Found in ExternalContext

    Hi, I have an a error in Jboss 7.0.2 "Arc", spring webflow 2.3.0.RELEASE with richfaces 4.0.0.Final(Myfaces 2.1.1):
    12:34:19,729 SEVERE [org.apache.myfaces.renderkit.ErrorPageWriter] (http--127.0.0.1-8080-2) An exception occurred: javax.faces.FacesException: java.io.FileNotFoundException: /sections/login/header.xhtml Not Found in ExternalContext as a Resource
    when i run my login.xhtml page:

    Code:
    <ui:composition template="/WEB-INF/flows/template/default.xhtml"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich">
    
     <ui:define name="windowTitle">
        #{msgs.loginTitle}
     </ui:define>
    
     <ui:define name="heading">
        <ui:include src="/sections/login/header.xhtml"/>
     </ui:define>
    
     <ui:define name="sidebarLeft">
        <ui:include src="/sections/login/sidebarLeft.xhtml"/>
     </ui:define>
    
     <ui:define name="content">
        <h:form>
           <h:panelGrid columns="2">
              #{msgs.namePrompt}
              <h:inputText id="name" value="#{user.name}"/>
              #{msgs.passwordPrompt}
              <h:inputSecret id="password" value="#{user.password}"/>
           </h:panelGrid>
           <p>
              <h:commandButton value="#{msgs.loginButtonText}"
                               action="planetarium"/>
           </p>
        </h:form>
     </ui:define>
    </ui:composition>
    The code of header.xhtml is:
    Code:
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"> 
    <!--  <head><title>IGNORED</title></head> -->
       <body>
          <ui:composition>
             <div class="header">
                #{msgs.loginHeading}
             </div>
          </ui:composition>
       </body>
    </html>
    this is my web.xml:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
             version="3.0">
    
    <!-- Log4j configurated in spring!!!, 
    before any code directly calling log4j (calling through commons logging doesn't count)? Jing Xue -->
    	<context-param>
    		<param-name>log4jConfigLocation</param-name>
    		<param-value>/WEB-INF/log4j-webapp.properties</param-value>
    	</context-param>
    	<context-param>
    		<param-name>log4jRefreshInterval</param-name>
    		<param-value>1000</param-value>
    	</context-param>
    	<context-param>
      		<param-name>webAppRootKey</param-name>
      		<param-value>myWebapp-instance-root</param-value>
    	</context-param>
    	<listener>
    		<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    	</listener>
    
    <display-name>richfaces-application</display-name>
    <!-- Listener para crear el Spring Container compartido por todos los 
    Servlets y Filters (WebApplication Context)-->
    <context-param>
    	<param-name>contextConfigLocation</param-name>
    	<param-value>
    		classpath*:META-INF/spring/spring-master.xml
    		WEB-INF/spring/spring-security.xml
    	</param-value>
    </context-param>
    
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    <!-- For JSF -->
    	<listener>
    		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    	</listener>
    <!-- Jboss not use it bundle integrated JSF -->
    	<context-param>
            <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
            <param-value>true</param-value>
        </context-param>
    	
    <!-- Facelets, tell JSF to use Facelets -->
     	<context-param>
            <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
            <param-value>com.sun.facelets.FaceletViewHandler</param-value>
        </context-param>
        
    <!-- Spring JavaServiceFaces framework ApacheMyfaces -->
        <listener>
            <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
        </listener>
    
    <!-- Spring Security, for all -->
    	<filter>
    		<filter-name>springSecurityFilterChain</filter-name>
    		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    	</filter>
    	<filter-mapping>
    		<filter-name>springSecurityFilterChain</filter-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>
            
            <context-param>
    	<param-name>org.richfaces.SKIN</param-name>
    	<param-value>blueSky</param-value>
    	</context-param>
    
    <!-- RichFaces Framework -->
    		<!-- For control of skins -->
    	<context-param>
    	<param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
    	<param-value>enable</param-value>
    	</context-param>
    
    <!-- Servlets for JSF-->
    	<servlet>
    		<servlet-name>faces</servlet-name>
    		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    		<load-on-startup>1</load-on-startup>
    	</servlet>
    	<servlet-mapping>
            <servlet-name>faces</servlet-name>
            <url-pattern>*.xhtml</url-pattern>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
    
    <!-- Servlet for Dispatcher of flows -->
    <servlet>
        <servlet-name>transportes</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>WEB-INF/spring/transportes-servlet.xml</param-value>
    	</init-param>
    	 <load-on-startup>2</load-on-startup> 
    </servlet>
    <servlet-mapping>
            <servlet-name>transportes</servlet-name>
            <url-pattern>/flows/*</url-pattern>
    </servlet-mapping>
    
    <!-- Servlet register for SpringFaces, SpringJavaScript -->
    	<servlet>
            <servlet-name>resources</servlet-name>
            <servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
            <load-on-startup>0</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>resources</servlet-name>
            <url-pattern>/resources/*</url-pattern>
        </servlet-mapping>
    <!-- Page That control SpringWeb -->
        <welcome-file-list>
            <welcome-file>/WEB-INF/flows/inscripcion/login.xhtml</welcome-file>
        </welcome-file-list>
    </web-app>
    they where like this:
    +WEB-INF
    +--flows
    +---inscripcion
    ------inscripcion-flow.xhtml
    ------inscripcion.xhtml
    ------login.xhtml
    +---sections
    +-----inscripcion
    +-----login
    -------header.xhtml
    -------siderbarLeft.xhtml
    +---template
    Why is this error?, I attached my prompt of JBoss.Attachment Attachment
    Thnks.
    Attached Files
    Last edited by BanKtsu; Sep 30th, 2011, 12:04 PM.
Working...
X