META-INF

本文详细介绍了Java Web应用程序中META-INF目录的作用及MANIFEST.MF文件的用途。META-INF目录用于配置应用程序、扩展、类加载器和服务等。MANIFEST.MF文件则定义了扩展和包的相关数据,包括版本信息及模块依赖等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

For web, the META-INF directory is typically found in Java based webapplications such as jsp (Java server pages). You can also find them in Java related webservers such as Apache-Tomcat.

The file you mentioned:

MANIFEST.MF: The manifest file that is used to define extension and package related data. So mostly it can contain human readable info like version, producer,.. but also machine readable info like module dependencies in external frameworks you may be using

Everything inside META-INF:

The files/directories in the META-INF directory are recognized and interpreted by the Java Platform to configure applications, extensions, class loaders and services.

When you don't "deviate" of the normal path (eg: you have no additional frameworks,...), you don't need certain files and thus nothing happens if you delete them. Java will create a default manifest file with every application.

A META-INF directory is used in all sorts of applications, including zipped file formats like epub, open office and office open xml, so it would probably help if you mentioned what kind of web application you noticed this with. In most cases I've seen it's used to to tell an application what kind of use is intended for a ZIP file and typically includes metadata (just like it says on the tin) and possibly a manifest. 


Usually,existing a MANIFEST.MF file inside the META-INF folder. In this file, you can remark your project information such as :version and .jar refered to. If you package your ejb project, you must remark all .jar which you're refering to,then the container can load your refered classes in the refered package properly. Otherwise, the contianer may generates some errors like "can't find the class xxx"

转载于:https://my.oschina.net/u/138995/blog/203985

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值