I have all got my html files in a particular directory say: "C:\MyProject\test", I do not want to copy the contents of this folder in to tomcat webapp-web-inf, Can i associate a link such that when i type onthe url http://localhost/test it maps to the contents of physical folder "C:\MyProject\test"
if you have been constructing your webapp in c:\myproject\test (meaning, "test" is the root of your webapp, and you have a WEB-INF folder inside c:\myproject\test)... then you can use the Context element's docBase attribute.
Basically, Tomcat can host a webapplication from anywhere on your hard drive, not just from the webapps directory. You use docBase to tell it where to find the files.
But if you want *some* files under webapps and *some* files somewhere else, then this is different. As far as I'm aware, there's nothing like an Apache (web server) 'alias' directive for folders/URL paths. At an OS level, you can try things like symlinks, but Tomcat may not honour them. Windows is even more difficult.
Your best strategy is to have all your files in one place. If you insist on two places, then write a deployment script that does all the heavy lifting for you. ie: You'd run your deploy script, and it would do all the copying and moving files around for you.
Something about .... going for a swim. With this tiny ad ...