1 Reply Latest reply on Feb 23, 2012 1:01 PM by juanjava

    s:graphicImage error - not displaying

    juanjava Newbie

      Hi...

       

      I'm building an app based on: jBoss 5.1 + seam 2.2.2 + richfaces 3 (latest)

       

      I'm trying to display an image from a byte[] field from the database. Everybody told me I should use s:graphicImage to display it.

       

      I simplify everything to

       

      <s:graphicImage value="#{modelHome.instance.image}" fileName="imagen" />

       

      It displays nothing (image is not null, I check it), and firebug throws an error: "NetworkError: 404 No Encontrado - http://localhost:8080/app/seam/resource/graphicImage/imagen.png"

       

      Already searched the web about it but can't find anything clear (found some "thanks, already solved", but the OP didn't tell HOW).

       

      part of my web.xml:

       

      <!-- Seam -->

       

          <listener>

              <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>

          </listener>

       

          <filter>

              <filter-name>Seam Filter</filter-name>

              <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>

          </filter>

         

          <filter-mapping>

              <filter-name>Seam Filter</filter-name>

              <url-pattern>/*</url-pattern>

          </filter-mapping>

         

          <servlet>

              <servlet-name>Seam Resource Servlet</servlet-name>

              <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>

          </servlet>

       

          <servlet-mapping>

              <servlet-name>Seam Resource Servlet</servlet-name>

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

          </servlet-mapping>

       

      and my upload component:

      <s:fileUpload id="image" data="#{modelHome.instance.image}"

              accept="image/jpg,image/png" />

       

      what am I missing?

       

      Thanks