• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

web-inf vs WEB-INF with Maven WAR plug-in

Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

We're converting our project layout to use Maven and I'm running into some difficulties. I can't seem to find clear, comprehensive documentation on the Maven WAR plugin, so I'm hoping someone here can share some expertise.

Does the WAR plug-in generate the web.xml file? I ask because I keep getting errors related to the content of an <env-entry> element even after I have corrected the issue in the sources from my "resources" directory.

In the WAR created by Maven (building on Win32) I have both a "web-inf" and a "WEB-INF" directory. When I deploy to Unix, these are going to be separate directories, unless the SUN Appserver8 is a lot smarter about deploying than I have a right to expect it to be. When I search the sources (again, on Win32) I can't find a directory that uses the lower-case name, and that's why I'm wondering if the WAR plug-in is doing some sleight of hand. I know that Win32 might be showing me the "wrong" filename, but it shows only uppercase "WEB-INF" in all the sources.

BTW, does anyone know where the actual spec for the content and format of the WAR file is? I had believed that the spec calls for the use of "WEB-INF" in all capitals, but I can't confirm that by checking the latest J2EE and Servlet specs.

Thanks for any and all help with these questions,

Saloon Keeper
Posts: 27876
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Microsoft Windows displays names in a case-sensitive manner, but searches in a case-insensitive manner. So if you were to unzip a unix-created ZIP file with both a web-inf AND a WEB-INF into the same containing directory, the results would be a combination of both directories into a single directory and I'd rather not find out what the capitalization of the winner was.

Just to make it more fun, even under Windows, the Java file services are case-sensitive, except in cases where they can't be because the OS has made it impossible. So mind your case in ALL filenames and directories, regardless of OS!

The proper capitalization for a WAR is WEB-INF - all upper case, For any JAR, you'd also find metadata in META-INF. The web.xml file's name is all lower case. The JAR manifest should be META-INF/MANIFEST.MF, although I've seen some leniency on capitalization here.

Although the J2EE spec should spell out the structure of a WAR definitively, I picked up my info off the docs on the jakarta Tomcat site.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic