File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes GWT and the fly likes GWT .war file building problem (Ant Build) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "GWT .war file building problem (Ant Build)" Watch "GWT .war file building problem (Ant Build)" New topic

GWT .war file building problem (Ant Build)

Berkan Sesen

Joined: Oct 04, 2011
Posts: 12

I am trying to build a .war file from my GWT (and SmartGWT) project to deploy in TomCat. In order to do this, I follow the steps (first create a .jar under <projectname>/war/WEB-INF/lib/<proejctname>.jar and then create the .war) and the antbuild given on

This seemed to work fine when I did not have non-java resources (e.g. images,database, html, etc.) in my project. However, after adding these resources under "<projectname>/war/WEB-INF/" when I packaged and deployed my project to TomCat, I started getting a lot of errors as: "File not found in directory: /<projectname>/war/WEB-INF/ontology/ontologyname.owl", "http: The requested resource (/welcomehtml/index.htm) is not available.", etc.

For the first error, I noticed that the application deployment under my " .../tomcatx.x/webapps/<projectname>/WEB-INF" did not even include the ontology folder. So the .war buid completed with a missing folder.
For the second error, I noticed that ".../tomcatx.x/webapps/<projectname>/welcomehtml/index.htm" exists but somehow the Tomcat deployment cannot reach it.

My GWT project runs completely fine in debug mode and it is only the deployed .war file which gives me these invalid directory errors. The ant build I use is given below, and as I have mentioned it worked fine initially (before I had extnesive non-java files under my project).

Does anyone have an idea what the problem may be? Does the fact that it works fine in GWT debug mode suggest this is a purely .war building problem?
In this case, do you have any suggestions (and I believe the post will have to be moved to a different forum)

Thank you very much for your help in advance,

I agree. Here's the link:
subject: GWT .war file building problem (Ant Build)
It's not a secret anymore!