Is the WEB-INF
folder in the CLASSPATH
of a Java Web application?
WEB-INF. This directory, which is contained within the Document Root, is invisible from the web container. It contains all resources needed to run the application, from Java classes, to JAR files and libraries, to other supporting files that the developer does not want a web user to access.
Re: Is META-INF in the classpath? No, not generally. If its needed you would have to use a META-INF/jboss-structure. xml to instruct the structure deployers to add it.
The classpath is always set from a source outside the program itself. Separating this responsibility from the program allows the Java code to reference the classes and packages in an abstract manner, allowing the program to be configured for use on any system.
The META-INF directory is private and can't be accessed from the outside. On the other hand, it also contains the WEB-INF public directory with all the static web resources, including HTML pages, images, and JS files. Moreover, it contains the web. xml file, servlet classes, and libraries.
I'm assuming you're referring to the /WEB-INF
directory in the root of the web application folder structure.
No, it's not in the classpath.
/WEB-INF/classes
is on the classpath though, and so are the JAR files in /WEB-INF/lib
.
Additionally files in WEB-INF are protected against being requested by the web-container, i.e. they are invisible to the outside world.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With