I'm sorry if this question has been asked before, but I can't seem to find an answer for it anywhere else.
I am running a local tomcat instance using eclipse and wtp. When the local server is running, I have to use the url http://localhost:8080/appName in order to access it.
I have been using relative URLs to use my javascript and css, but now I would like start using namespaced URLs, such as domain.com/admin/users. I can't use relative css and javascript resources with these urls, since there is no javascript in the admin directory.
How can I use css and javascript resources from either my development or my production context? Is there a way to use my local tomcat instance from the ROOT context, as I can do in production? Do I have to use something to build the URLs for my resources (I would have to do this a lot, in both struts2 jsps, as well as sitemesh) ?