2 Replies Latest reply on Jan 7, 2009 5:42 AM by syvalta

    Relative URLs in RichFaces

    syvalta

      We are using http proxy which allows changing url's, i.e. http://proxy/foo/bar is proxied to http://backend/bar. Unfortunately the proxy doesn't rewrite the hrefs included in the content returned. In our application we are using relative URLs, so they work nicely.

      However, Richfaces uses absolute path in references:

      <link class="component" href="/context/a4j/s/3_3_0.CR1org/richfaces/etc.."

      This prevents the proxy to work properly. I think it's possible to define the context used by richfaces in web.xml, but in our case that is unfortunately very problematic solution. Is there a way to make RichFaces use relative URL's when it references it's stylesheets, javasrcipt and other resources?

        • 1. Re: Relative URLs in RichFaces

          I guess it will be impossible to use relative URL's in any realistic scenario. I'd recommend to configure your proxy to translate URL backward. What kind of proxy do you use?

          • 2. Re: Relative URLs in RichFaces
            syvalta

             

            "ishabalov" wrote:
            I guess it will be impossible to use relative URL's in any realistic scenario.

            I have always thought it as a good practice to use relative URL's (but I might be wrong). Could you explain why do you think it is not feasible?

            "ishabalov" wrote:
            I'd recommend to configure your proxy to translate URL backward. What kind of proxy do you use?

            We are using Weblogic plugin (http://e-docs.bea.com/wls/docs100/plugins/) and it doesn't seem to support that.