Most of the places on the internet say it stands for WEB INFormation.
I rather doubt it. The folder contains executables. Information is not a suitable name for it.
Most of the places on the internet say it stands for WEB INFormation.
I rather doubt it. The folder contains executables. Information is not a suitable name for it.
As far as I know, "INF" stands for "Information", as you said. It probably was named WEB-INF
for similarity with the META-INF
directory in JAR files. Sometimes the meaning of a directory changes so much over time that it no longer makes sense. For example, bin
directories in Unix/Linux often contain non-binary "executable" files, such as shell scripts.
META-INF
then? Why invent WEB-INF
when META-INF
already serves the needed purpose? –
Chesna WEB-INF
is accessible as web resource. I.e. ServletContext#getResource()/getResourceAsStream()
can access it as well as ServletRequest#getRequestDispatcher()
. META-INF
isn't accessible as web resource and shouldn't be. I.e. you shouldn't put web resources like JSP files there. –
Gaffrigged I believe it's really named WEB-INF to mirror the META-INF directory in a jar file, which contains meta information. I do see what you mean about it being as much about executables as "information" but the main point is that it doesn't contain the documents of the application.
It's a directory to store private application content. Anything your app needs but your client doesn't can be stored there. Anything in that directory is not visible to the web.
Source:
http://tomcat.apache.org/tomcat-7.0-doc/appdev/source.html#Directory_Structure http://docs.oracle.com/cd/E13222_01/wls/docs70/webapp/basics.html#136976
WEB-INF
actually stands for. –
Eldwon I think, the only logical definition is WEB-INF is mirror of META-INF. Naming is really important for beginners and if it is confusing then the subject is getting harder to understand.
The WEB_INF
folder contains the web.xml
(deployment descriptor) file, the classes, external libs etc and as web.xml
file contains the information about the container urls, files etc, the folder is known as WEB-INF
.
WEB-INF
actually stands for. –
Eldwon As far as I know, "INF" stands for "Information", as you said. It probably was named WEB-INF for similarity with the META-INF directory in JAR files.
–
Zeist © 2022 - 2024 — McMap. All rights reserved.