JavaEE应用程序中的app-inf和web-inf文件夹有什么区别? [英] What difference between app-inf and web-inf folders in JavaEE applications?

查看:897
本文介绍了JavaEE应用程序中的app-inf和web-inf文件夹有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能否介绍一下javaEE应用程序中APP-INF和WEB-INF文件夹之间的主要区别。

Can you give me understanding of main difference between APP-INF and WEB-INF folders in javaEE applications.

谢谢

推荐答案

APP-INF

在包含的企业应用程序(EAR应用程序)中许多war和jar(例如.WebApp1.war,WebApp2.war,EJB1.jar和EJB2.jar。)并假设所有这些模块都想使用一些可用作Jar(common.jar)一部分的类。因此,在这种情况下,最好将此jar文件放在APP-INF目录下,这就是为什么我们不需要在每个模块中放置相同的Jar 4次。

In an enterprise application (EAR application) which contains many war and jars (eg.WebApp1.war, WebApp2.war, EJB1.jar and EJB2.jar.) and suppose all these Modules want to use some classes which is available as part of a Jar (common.jar). So in this case it is better to Place this jar file inside under "APP-INF" directory,that why we don't need to put the same Jar 4 times inside each and every Modules.

WEB-INF

WEB-INF是一个目录,是Web应用程序的私有区域,任何文件都在无法通过指定URL直接从浏览器访问WEB-INF目录。

WEB-INF is a directory that is a private area of the web application, any files under WEB-INF directory cannot be accessed directly from browser by specifying the URL.

请参阅EAR应用程序结构;

See EAR application structure;

这篇关于JavaEE应用程序中的app-inf和web-inf文件夹有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆