I have my application in webapps/songcrit. I have Apache hpptd set up with a virtual host to send www.songcrit.com to that directory. But jsf keeps sending back the results of navigation rules with the songcrit directory attached so if it's supposed to direct to http://www.songcrit.com/user.jsf, it directs to http://www.songcrit.com/songcrit/user.jsf. And of course that doesn't exist, so I get a 404 error.
webapps/songcrit is not a "directory" according the the server's configuration, it is the physical location of a deployed exploded WAR and as such is only indirectly associated with a URL.
J2EE permits the deployment of multiple webapps within a server, but the only way that the server can tell which webapp to dispatch a given URL to is by looking at the context path part of the URL. The context path is the fragment of the URL that the server has associated with the webapp; by default, if you deploy a webapp in the webapps/songcrit directory of a Tomcat server and do not supply an explicit context path, Tomcat will default the context URL to be "http://hostname:port/songcrit", using the appropriate hostname and the default port of 8080.
Thus, the "songcrit" context name is not optional. Without it, the J2EE server cannot route the request properly. At best, it will route to the default webapp (if any) for that server, and not to the songcrit app.
With apache running the front-end, you can give the illusion of removing "songcrit" from the URL, but you have to use mod_proxy or mod_jk to proxy the requests to Tomcat. Simply rewriting the incoming URLs isn't sufficient.
Sources may include data from the Fakebook Research Foundation with support from Gargle University
Thanks for the reply. Maybe this is becoming less of a JSF question, but here is the section from my httpd.conf
Am I doing things right here? If not how can I fix it? If so, where do you think the problem lies.
I have searched Google endlessly for days on this issue. I can't believe no one has had this problem before. Surely other people host multiple sites on their servers and don't want their to be a directory name in the URL...