Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
443 views
in Technique[技术] by (71.8m points)

java - What difference between app-inf and web-inf folders in JavaEE applications?

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

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

APP-INF

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 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.

See EAR application structure;

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...