I have been developing an application on
Tomcat and things are running smooth. However, for demonstration purposes I have to deploy the application using
Ant. For development purposes I manually created a folder in "webapps" of tomcat and manually created all the other folders. The name of the root directory is quizz and the directory structure is as follows:
In Tomcat's root directory, webapps, I have my application root directory "quizz". In quizz I have all of my
jsp's, images folder(with images), css folder(style sheets) and another folder called WEB-INF.
In WEB-INF I have a web.xml file and two other folders, a "classes" folder and a "lib" folder. As usual the classes folder stores all my
java .class files and .java files. This structures works fine on Tomcat and I was able to develop my application which worked fine. However for the purposes of using ant I had to use another directory structures and copied all the necessary files in a different directory structure. This structures is as follows. In a folder called package that resides on my desktop I have the "build.xml" and three other folders. Those folders are:
src, web and meta-data.
The web folder has all the presentation files, .jsp's, images folder, css folder. The src folder has all the java .class files. And the meta-data folder has the web.xml file. When I run "ant" it is supposed to place everything neatly and nicely on tomcat for me so that I can just re-start the server and run. I get a successful build but the app does not work. I get a HTTP status 404 error stating the requested resource is not available. Here is what my build.xml looks like.
The ant places a different directory structure in "webapps". It generates a war file with the app name and a folder with the app name. The folder has a WEB-INF folder and a META-INF folder. Can some one help. I hope my explanation was not long winded.