For various reasons -- enough reasons to be roadblocks to considering otherwise -- we need to front JBoss with Apache HTTPD. Some of these reasons also mean that we want the servlet application to appear it is at the root of the web server. When we had a straight Tomcat-hosted servlet, this bit of configuration on the webserver side worked:
With a Seam-based app, though, I'm seeing multiple redirects forcing the URL to include the context path. The series of HTTP requests below is an example of what happens when submitting a form on the home page (a.k.a. /app/home.seam or simply '/' as the client sees it after the ProxyHTMLURLMap processing):
POST / HTTP/1.1 Host: host.name.here Referer: http://host.name.here/ Cookie: JSESSIONID=B1FF86EED9F5B69E812CD173B74010FE Content-Type: application/x-www-form-urlencoded Content-Length: 8258 search%3Aq=sample&search%3Asearch=search&search_SUBMIT=1&search%3A_link_hidden_=&? jsf_tree_64=rO0ABXN...stuff...&jsf_state_64=rO0ABXV...more.stuff...&jsf_viewid=%2Fhome.xhtml HTTP/1.x 302 Moved Temporarily Date: Wed, 10 Jan 2007 01:24:35 GMT X-Powered-By: Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5 Location: http://host.name.here/app/itemList.seam?cid=37 Content-Length: 0 Content-Type: text/plain Connection: close GET /app/itemList.seam?cid=37 HTTP/1.1 Host: host.name.here Referer: http://host.name.here/ Cookie: JSESSIONID=B1FF86EED9F5B69E812CD173B74010FE HTTP/1.x 404 /app/app/itemList.seam Date: Wed, 10 Jan 2007 01:24:36 GMT X-Powered-By: Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5 Content-Type: text/html;charset=utf-8 Connection: close
(The request headers that had no direct bearing on the problem were removed.)
Does this look normal? Can you think of any reason why Seam would be treated differently by the ProxyHTMLURLMap process?