Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

is it web-inf or WEB-INF  RSS feed

 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, it is web-inf or WEB-INF

I've obviously been on Windows too long, because case sensitivity doesn't seem to matter to a bunch of my apps. I just opened up a war file with WinZip, and IRAD has placed the ibm-web-ext.xmi file under web-inf, but it placed all the compiled code under WEB-INF\classes.

So, which one should it be? I've always thought it was upper case, although I think all lower-case is more asthetically pleasing.

Insight?

-Cameron McKenzie
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WEB-INF
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not OS dependent.
Java itself is a case sensitive language.

If your app is working using 'web-inf', either your container was specifically written to search for that directory in a case insensitive manner (which is not spec compliant), or its using native calls to search for the directory.

In either case, misspelling WEB-INF will result in a non-portable web application and, at best, should be considered a 'poor practice'.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I'm opening up a bunch of war files created by an industry leading rapid application development tool.

Compiled code is in WEB-INF\classes. The web.xml and portlet.xml files are in web-inf. So, different casing within the same war file! Not a huge deal on Windows, but it sure would be confusing if the contents were extracted to a case-sensitive OS.

"Poor practice" I agree. Frustrated.

-Cameron McKenzie
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"industry leading" doesn't always mean "good".
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!