File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes META-INF directory? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "META-INF directory?" Watch "META-INF directory?" New topic
Author

META-INF directory?

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
What is META-INF directory?

Thanks.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

It's a directory that has special meaning in JAR files.
See the JAR File Specification.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

This is not a Servlet question.
Rathi, please try to be more careful of the forums where you ask you questions.

Moving to the Java in general (beginner) forum.

Dave
Beng Wooi Toh
Greenhorn

Joined: Dec 02, 2005
Posts: 3
I do not know whether there is a formal long-form for META-INF and WEB-INF, but many consider them to stand for META INFORMATION and WEB (component) INFORMATION.

Meta information is information about something.

A typical .ear (Enterprise ARchive) file will probably have (just an example) :
META-INF/MANIFEST.MF
META-INF/application.xml

A typical .jar (Java ARchive) file will probably have (just an example) :
META-INF/MANIFEST.MF
META-INF/ejb-jar.xml
META-INF/jboss.xml (dependent on container used)

A typical .war (Web ARchive) file will probably have (just an example) :
META-INF/MANIFEST.MF
WEB-INF/classes/com/compname/xxx/Xxx.class
WEB-INF/jboss-web.xml (dependent on container used)
WEB-INF/web.xml

Since .ear, .jar and .web are J2EE packaging components, their XXX-INF directory contains files that describes the component/contents of the component.

Sometimes files that are under XXX-INF are usually not used when the application/component is run. For example, if you do not want a .jsp, .html or any file to be directly accessible from the outside (eg, web browser), then you can just place them under the WEB-INF dir.

Hope this helps.
[ December 23, 2005: Message edited by: Beng Wooi Toh ]
Stuart Ash
Ranch Hand

Joined: Oct 07, 2005
Posts: 637
Originally posted by David O'Meara:
This is not a Servlet question.
Rathi, please try to be more careful of the forums where you ask you questions.

Moving to the Java in general (beginner) forum.

Dave


Having come across META-INF while learning Servlets, a learner like Rathi would have thought this might be related to servlets. So, it might be a little harsh/overbearing to expect them to post it under another category, wouldn't it?


ASCII silly question, Get a silly ANSI.
Beng Wooi Toh
Greenhorn

Joined: Dec 02, 2005
Posts: 3
Having come across META-INF while learning Servlets, a learner like Rathi would have thought this might be related to servlets. So, it might be a little harsh/overbearing to expect them to post it under another category, wouldn't it?


Agree
 
Don't get me started about those stupid light bulbs.
 
subject: META-INF directory?
 
Similar Threads
How to use Container Managed EntityManager inside the SessionBean
META-INF inside war file
what is the use of meta-inf directory in weblogic server??
Please help on deployment descriptors
Can we modify ejb-jar.xml file