Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is META-INF called META-INF?

I am trying to explain the fundamentals of web applications. I came across this question on META-INF and WEB-INF. How did those directories get those names?

like image 620
Geordee Naliyath Avatar asked May 20 '11 16:05

Geordee Naliyath


2 Answers

Jar files are actually ZIP files with extra information and possibly better indexing. When packing the extra information into the ZIP file it becomes important to place it in a location which is not likely to conflict with normal ZIP file contents.

The selection of META-INF as a directory in which information about the JAR file could be stored was an attempt to use directories as a name space within the ZIP file. Basically, if it was stored in META-INF, it was Meta-data Information, or (picking amongst the possible meanings of meta), "self information" or "abstract information".

This allowed the storage of information which would impact the handling of the ZIP file within the ZIP file itself, without breaking the ZIP file packaging. This was key, as it prevented the need to create a new, portable compression format and popularize it for the purpose of Java code packaging. As people became accustomed to the utility of META-INF, new "name spaces" in the ZIP file were created for specific packaging formats, for example "WEB-INF".

The first "extensions" to the ZIP file format was the addition of a manifest, or MANIFEST.MF and the optional addition of an index list (to speed item extraction). Now such files (due to having a known extension name space) have been able to extend in many other ways, like the recent addition of the sub-directory "services" for service registration.

When you consider that ZIP files contain files and directories, it only makes sense to use a directory as a name space.

like image 150
Edwin Buck Avatar answered Sep 30 '22 17:09

Edwin Buck


Meta

Web

"Inf" I would imagine is short for "information."

like image 34
Isaac Truett Avatar answered Sep 30 '22 17:09

Isaac Truett