This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Is it compulsory to have one's application immediately under webapps directory? I want to have my application to be accessed as http://localhosts:8080/a/b/Servlet, where a is under webapps and b is in a.
Some previous discussions at this place have given some solutions and they do not work. For example, Configure Tomcat 6 to serve applications in other than default directory, does give one solution and it does not work. While starting, Tomcat 6.0.14, it gives serious error.
It is compulsory to have a well formed application directory structure (there has to be a 'WEB-INF' directory in the root of your application.
As long as you have a proper directory structure, you can configure Tomcat to deploy it from any directory that it can see.
To do this, you can add a <Context .../> entry to your server.xml (old way) or create a context fragment file in tomcat/conf/Catalina/localhost with the <Context .../> tag in it (best practice). With either approach, just add a the path to your app in the docBase attribute.