Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Is the WEB-INF folder in the CLASSPATH of a Java Web application?

share|improve this question
    
This question seems to ask a similar thing: stackoverflow.com/questions/305285/… –  andri Apr 27 '09 at 15:03

2 Answers 2

up vote 59 down vote accepted

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.

share|improve this answer

Additionally files in WEB-INF are protected against being requested by the web-container, i.e. they are invisible to the outside world.

share|improve this answer
    
Unless you forward the request (although BEA had a broken implementation of this many years ago). –  Tom Hawtin - tackline Apr 27 '09 at 15:37
1  
You can almost always circumvent protection. –  Thorbjørn Ravn Andersen Feb 9 '10 at 16:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.