1 Reply Latest reply on Dec 20, 2006 10:32 AM by lara khoury

    Not able to open a jsfx file in the browser eventhough proje

    lara khoury Newbie

      Hi,

      It is very weird what is happening.

      At first, I had problems with deploying my project knowing that I am using
      jboss-4.0.5.GA and jboss-seam-1.1.0.GA but I was able to solve them by reading some blogs on the forums.

      Now that I am deploying the project, I don't get any error on the server and everything looks fine but when I try to write the url of a page in the browser, let us say:

      http://localhost:8080/bpmshell/executors.jsfx
      


      I got this pop-up window, just click on the link to see it:

      http://tinypic.com/view/?pic=2mgpdgk
      


      The server looks as follows:
      04:06:17,453 INFO [FacesConfigurator] Reading standard config org/apache/myfaces/resource/standard-faces-conf
      ig.xml
      04:06:17,546 INFO [FacesConfigurator] Reading config jar:file:/D:/servers/jboss-4.0.5.GA/server/default/tmp/d
      eploy/tmp17588bpmshell.ear-contents/bpmshell.ejb3-contents/jboss-seam.jar!/META-INF/faces-config.xml
      04:06:17,562 INFO [FacesConfigurator] Reading config jar:file:/D:/servers/jboss-4.0.5.GA/server/default/./tmp
      /deploy/tmp17588bpmshell.ear-contents/bpmshell-exp.war/WEB-INF/lib/jboss-seam-debug.jar!/META-INF/faces-config
      .xml
      04:06:17,578 INFO [FacesConfigurator] Reading config jar:file:/D:/servers/jboss-4.0.5.GA/server/default/./tmp
      /deploy/tmp17588bpmshell.ear-contents/bpmshell-exp.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/faces-config.xm
      l
      04:06:17,625 INFO [FacesConfigurator] Reading config jar:file:/D:/servers/jboss-4.0.5.GA/server/default/./tmp
      /deploy/tmp17588bpmshell.ear-contents/bpmshell-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/faces-config.xml
      
      04:06:17,640 INFO [FacesConfigurator] Reading config /WEB-INF/faces-config.xml
      04:06:17,796 WARN [LocaleUtils] Locale name in faces-config.xml null or empty, setting locale to default loca
      le : en_US
      04:06:18,015 INFO [StartupServletContextListener] ServletContext 'D:\servers\jboss-4.0.5.GA\server\default\.\
      tmp\deploy\tmp17588bpmshell.ear-contents\bpmshell-exp.war\' initialized.
      04:06:18,015 INFO [StartupServletContextListener] Serialization provider : class org.apache.myfaces.shared_im
      pl.util.serial.DefaultSerialFactory
      04:06:18,125 INFO [EARDeployer] Started J2EE application: file:/D:/servers/jboss-4.0.5.GA/server/default/depl
      oy/bpmshell.ear
      04:06:18,203 INFO [Events] no events.xml file found
      04:06:18,234 INFO [Pages] no pages.xml file found
      


      My web.xml as follows:
      <?xml version="1.0" ?>
      
      <web-app version="2.5"
       xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
      
       <!-- Seam -->
       <listener>
       <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
       </listener>
      
       <!-- Propagate conversations across redirects -->
      
       <filter>
       <filter-name>Seam Exception Filter</filter-name>
       <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
       </filter>
       <filter-mapping>
       <filter-name>Seam Exception Filter</filter-name>
       <url-pattern>/*</url-pattern>
       </filter-mapping>
      
       <filter>
       <filter-name>Seam Redirect Filter</filter-name>
       <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
       </filter>
       <filter-mapping>
       <filter-name>Seam Redirect Filter</filter-name>
       <url-pattern>*.jsfx</url-pattern>
       </filter-mapping>
      
      
       <listener>
       <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
       </listener>
      
       <!-- MyFaces -->
       <listener>
       <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
       </listener>
      
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>client</param-value>
       </context-param>
      
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</param-value>
       </context-param>
      
       <context-param>
       <param-name>com.sun.faces.validateXml</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <context-param>
       <param-name>com.sun.faces.verifyObjects</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <context-param>
       <param-name>facelets.DEVELOPMENT</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <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>*.jsfx</url-pattern>
       </servlet-mapping>
      
       <security-constraint>
       <display-name>Restrict XHTML Documents</display-name>
       <web-resource-collection>
       <web-resource-name>XHTML</web-resource-name>
       <url-pattern>*.xhtml</url-pattern>
       </web-resource-collection>
       <auth-constraint>
       <role-name>NONE</role-name>
       </auth-constraint>
       </security-constraint>
      
       <welcome-file-list>
       <welcome-file>index.html</welcome-file>
       <welcome-file>index.jsfx</welcome-file>
       <welcome-file>index.xhtml</welcome-file>
       <welcome-file>index.jspx</welcome-file>
       </welcome-file-list>
      
      </web-app>
      



      I don't know if anyone encountered such a problem before. I really need help because I am stuck!

      Thank you in advance,
      Regards
      Lara

        • 1. Wrong mapping from web.xml
          lara khoury Newbie

          Sorry, the title wasn't clear enough. What I meant is that the mapping in the web.xml file is not working and everytime I point to a page with the extension specified in the web.xml file, I am getting a file download window instead of the page itself opened. In my case the mapping was jsfx.

          Regards