2 Replies Latest reply on Mar 27, 2008 6:39 PM by renton1982

    mod_proxy with seam and tomcat5.5

    renton1982

      Hi Guys!


      I figured out a problem with seam on tomcat with mod_proxy and Apache in front of it.


      In my virtual host on Apache forward everthing like this:


      ProxyPass / http://localhost:8180/appname/
      ProxyPassReverse / http://localhost:8180/appname/




      and it just works fine. I can reach my app via: http://domain.tld


      Everytime I use a redirect like (in navigation.xml):


      <navigation-rule>
              <navigation-case>
                  <from-outcome>registered</from-outcome>
                  <to-view-id>/registered.xhtml</to-view-id>
              </navigation-case>
          </navigation-rule>



      Seam redirects me to: http://domain.tld/appname/registered.seam.


      Why is appname/ before registered.sem? Any ideas how i can prevent this?


      Thanks & greetings from Vienna/Austria


      Berni

        • 1. Re: mod_proxy with seam and tomcat5.5
          tom_goring

          Hi,


          This is not really a seam question but a apache / tomcat one.


          Anyway one way is to get tomcat to serve your app as in the root.


          Here is an example tomcat server.xml for this:



          <Host name="www.mysite.co.uk" debug="0" unpackWARs="true" autoDeploy="true"
                          appBase="/home/tomcat/apache-tomcat-5.5.17/webapps/MyWar">
          
                          <Context path="" docBase="" debug="1"/>
                  </Host>
          




          Then the apache proxy stuff will work.  Better would be to use mod-jk as that will handle errors better, etc.

          • 2. Re: mod_proxy with seam and tomcat5.5
            renton1982

            thanks a lot for your post - your hint worked for me!