Apache Proxy Breaks RichFaces

I’ve run into this twice now, so I wanted to document it here to help other folks, and to see if anyone knows the root cause of the issue.

When using RichFaces with Seam, things work just fine on my local development JBoss instance. But when I deploy the same EAR file up to my production JBoss instance, which is sitting behind an Apache proxy, everything works EXCEPT the rich/ajax stuff.

The issue was that the JavaScript located here: ContextRoot/a4j_3_1_4.GAorg.ajax4jsf.javascript.AjaxScript

would not load.

My Apache proxy was configured like this:

	ProxyPass /10MinuteMail balancer://mycluster/10MinuteMail/
	ProxyPass /10MinuteMail/* balancer://mycluster/10MinuteMail/
	ProxyPassReverse /10MinuteMail http://127.0.0.1:8080/10MinuteMail

With mycluster defined like this:

        
                AddDefaultCharset off
                Order deny,allow
                Allow from all

		BalancerMember http://127.0.0.1:8080
                #Allow from .example.com
        

Again, this configuration worked fine for everything EXCEPT that RichFaces JavaScript.

Since I am only using one node for 10MinuteMail, there is no real need for a load balancer configuration, so I replaced the configuration with this:

	ProxyPass /10MinuteMail http://127.0.0.1:8080/10MinuteMail
	ProxyPass /10MinuteMail/ http://127.0.0.1:8080/10MinuteMail/
        ProxyPassReverse /10MinuteMail/ http://127.0.0.1:8080/10MinuteMail/

Which works, and fixed the RichFaces reference.

So there’s your solution. However I have no idea what the actual root cause is.


Posted

in

by

Comments

4 responses to “Apache Proxy Breaks RichFaces”

  1. Jeremy Avatar

    This post is copied on another website without a link back to your original post or any credit to you. I found your original here by Googling the title. Check out
    http://www.virtisys.com/2008/03/23/apache-proxy-breaks-richfaces/

    I have contacted the hosting company for virtisys regarding copyright infringement of my own work (they ripped off one of my posts as well). You might consider doing the same. Or if you don’t care, then please pardon the interruption.

    Cheers,
    Jeremy

  2. Devon Avatar

    Jeremy,

    thank you for the heads up! I have also contact the hosting company, which happens to be my hosting company as well. Hopefully we’ll get some movement on this.

    Thanks again!

    Devon

  3. Devon Avatar

    Looks like they’ve taken the site down! That’s great!

  4. Thiago Moreira Avatar
    Thiago Moreira

    Did you ever find the real problem if the balancer + richfaces? I got the same issue and fixed with your workaround but I need a solution for a balancer.

Leave a Reply

Your email address will not be published. Required fields are marked *

PHP Code Snippets Powered By : XYZScripts.com