0 Replies Latest reply on Aug 12, 2010 4:10 AM by Kasper Sørensen

    Weird redirect when on a particular hostname

    Kasper Sørensen Newbie

      I'm experiencing a very weird problem. I want to be able to serve images that are stored in my DB and represented as JPA entities. I have it working on a JSF page like this:

      page descriptor:

      <page login-required="false" view-id="/view/image.xhtml">
           <rewrite pattern="/p/image/{id}/{filename}" />
           <rewrite pattern="/p/image/{id}" />

      page source:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
      <s:resource xmlns="http://www.w3.org/1999/xhtml"
           fileName="#{imageFileFinder.filename}" />

      ... and of course my ImageFileFinder just does a basic find-command based on the id request parameter.

      The webapp is currently hosted on two virtual hostnames. It works great when I try it on one of the hostnames:


      But on the other hostname I'm experincing a redirect,

      - from: https://my-second-hostname.com/p/image/1/helloworld.png

      - to: https://my-first-hostname.com/seam/docstore/document.seam?docId=1&cid=30

      Notice that I get redirected to the first hostname! And I have no idea why I get redirected in the first place...

      I'm running a JBoss 5.1 server and Seam 2.2.1-CR2. The virtual hostnames are configured using JBoss-web's server.xml, like this:

      <Host name="mywebapp" autoDeploy="false" deployOnStartup="false" deployXML="false">