4 Replies Latest reply on Sep 25, 2012 4:55 PM by davisonri_k12

    JSF redirect to non Faces app

    davisonri_k12

      I am using jsf 2. I have a command link in a facelet file that points to non-jsf app deployed on the same server. My current view is /app1/home.xhtml with a h:commandLink that has an action like so

      <h:commandLink value="#{link}" action="#{action.redirect}" target="_blank"/>

      The #{action.redirect} computes the destination based on certain conditions, an example of which could be /jspApp/home.do?param1=value1. However it appears that JSF tries to change the extension of the url to .xhtml. and then fails with the error message.

      com.sun.faces.context.FacesFileNotFoundException:/jspApp/home.seam Not Found in ExternalContext as a Resource

      how do i get this to correctly redirect ?

      i am using Weld with SEAM 3. this is my web.xml

         <servlet>

            <servlet-name>Faces Servlet</servlet-name>

            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

            <load-on-startup>1</load-on-startup>

         </servlet>

         <context-param>

            <param-name>javax.faces.DEFAULT_SUFFIX</param-name>

            <param-value>.xhtml</param-value>

         </context-param>

         <servlet-mapping>

            <servlet-name>Faces Servlet</servlet-name>

            <url-pattern>*.seam</url-pattern>

         </servlet-mapping>