0 Replies Latest reply on Mar 16, 2011 2:16 AM by damaru

    Part of html header missing after url rewrite

    damaru
      Hi,

      I'm trying to create a virtual website where any url ending with .seam gets rewritten to home.seam, with the original url as a parameter.

      For example,
      /foo.seam
      becomes
      home.seam?url=foo.seam

      I started off with a seam-gen project, and so far the home page is mostly untouched.

      I'm using urlrewritefilter to do this and it's mostly working, except for one thing.

      When I go directly to home.seam, I see the page properly formatted with the richfaces panel, logo and css.

      When I go to foo.seam which forwards to home.seam, the formatting is lost. When I view source, I see that a bunch of stuff is missing from the <head> element. What's missing is this:

           <script src="/a4j/g/3_3_3.Final/org/ajax4jsf/framework.pack.js" type="text/javascript"></script><script src="/a4j/g/3_3_3.Final/org/richfaces/ui.pack.js" type="text/javascript"></script><link class="component" href="/a4j/s/3_3_3.Final/org/richfaces/skin.xcss/DATB/eAGbo7-tNnT5DGkAEXoDrg__" rel="stylesheet" type="text/css" /><link class="user" href="/stylesheet/theme.xcss" rel="stylesheet" type="text/css" /><link class="user" href="/stylesheet/theme.css" rel="stylesheet" type="text/css" />

      but the rest of the page is all there.

      This stuff is not in my template, and must be getting generated by richfaces or something.

      The only filters I'm using are urlrewritefilter then seamfilter. My urlrewritefilter's config is very simple so far, just this:

          <rule>
              <from>^/foo.seam$</from>
              <to last="true">/index.seam?url=foo.seam</to>
          </rule>

      Any help would be very much appreciated!

      Any idea how this could happen?