If you are talking about can your web application reside outside of the webapps folder, then yes you can do that. You just need to define your application's context path and location. In tomcat you can go into %CATALINA_HOME%/conf/Catalina/ and create an xml file there with something like this as the content
For Tomcat 6, unlike Tomcat 4.x, it is NOT recommended to place <Context> elements directly in the server.xml file. This is because it makes modifing the Context configuration more invasive since the main conf/server.xml file cannot be reloaded without restarting Tomcat.