WEB-INF is the name of a folder found in Java web applications. It is used to store deployment information such as the web.xml, required library files and compiled class files. It is normally not accessible from web. Any files which you want to put on war but do not want to make to public then web-inf is the place where you can keep those files.
Questions tagged [web-inf]
185 questions
1
vote
1 answer
what is the difference between simple project/lib and project/web/WEB-INF/lib?
what is the difference between simple project/lib and project/web/WEB-INF/lib?
which jar should be in project/lib folder and which jars should be in web/WEB-INF/lib?

deep2111
- 25
- 8
1
vote
0 answers
How to define resource bundles from WEB-INF\classes in faces-config.xml
To declare a resource bundle in the faces-config.xml I always put them into \src\main\resources\com\company\messages.properties and reference them like this:
com.company.messages
…

Benny Code
- 51,456
- 28
- 233
- 198
1
vote
1 answer
Eclipse Dynamic Web Application putting jar files in WEB-INF/lib and Java Build Path
I have a very "basic" question regarding Java web application development (servlet). What is the difference between putting a jar file in WEB-INF/lib and putting it in Java Build Path/Library/External Jar?

Dustin Sun
- 5,292
- 9
- 49
- 87
1
vote
1 answer
NoClassDefFoundError exception in war file
I have jar files in WEB-INF/lib folder of the war file. When I run the server on Android (I'm using i-jetty as a web server), I get NoClassDefFoundError exception. The class that gives error is in one of the jar files. Software could not reach the…

sanchop22
- 2,729
- 12
- 43
- 66
1
vote
2 answers
How to acces a file under WEB-INF from a Java web application
Do you have any idea how to access files in WEB-INF/index folder from my application? I'm using OpenCMS for my application and I want to open a Lucene search index (with the help of Lucene IndexReader class) located at WEB-INF/index folder. Lucene…

John Manak
- 13,328
- 29
- 78
- 119
1
vote
2 answers
How to navigate between jsp pages
I have a jsp page called home.jsp outside the WEB-INF directory and an other jsp page called service.jsp inside the WEB-INF folder. I need to put this service.jsp page inside the WEB-INF directory so it cannot be accessible if a user attempts to get…

Anis Bedhiafi
- 185
- 1
- 5
- 22
1
vote
3 answers
How to write to a file in WebContent directory from a class in WEB-INF/classes directory
I have a Java Class UpdateStats in WEB-INF/Classes directory of a dynamic web application.This class has a function writeLog() which writes some logs to a text file.I want this text file to be in webcontent directory.Thus everytime the function is…

kamlesh tajpuri
- 31
- 1
- 1
- 2
1
vote
1 answer
how do i convert xml file to file type in eclipse
i am trying to use rest to show that i can create a File from an .xml document.
this is my code below. whenever i run it, it will return "not working", implying that the file does not exist.
the articles.xml file is sitting in my WEB-INF folder, i…

user2413192
- 59
- 5
1
vote
2 answers
Can't access resources outside WEB-INF folder
I put index.jsp inside WEB-INF. Then I have a servlet which dispatch request to that file.
@WebServlet(name="Home", urlPatterns={"/"})
public class Home extends HttpServlet {
@Override
protected void doGet(HttpServletRequest request,…
user477768
1
vote
1 answer
How to move "WEB-INF/lib" folder to a sub folder in a Java Dynamic Web App?
How can I configure a Java Dynamic Web Project in Eclipse so the WEB-INF/lib folder is located in a sub folder?
For example, say I wanted my "lib" folder to be located here:
src/main/webapp/WEB-INF/lib
and my webapp root is…

Brad Parks
- 66,836
- 64
- 257
- 336
1
vote
1 answer
Tomcat: The requested resource () is not available
I have 2 pages: page1.xhtml, page2.xhtml. From page1 I go to page2.
In page2 I have:
When I put page in WEB-INF and clicking on shuffle I get error:
…

Aram Gevorgyan
- 2,175
- 7
- 37
- 57
1
vote
4 answers
Problem with moving JSPs under WEB-INF directory
I am facing a problem when I move my JSP files along with CSS and JS files under WEB-INF/web/ directory. The problem is that, when a JSP page loads, it does not load CSS and JS files. Please help if you have any idea about it.
Thanks
Umar

craftsman
- 15,133
- 17
- 70
- 86
1
vote
1 answer
icefaces 3 - Cannot reach the backing bean from pages inside WEB-INF
I upgraded icefaces version from 1.8 to 3 and I'm facing the following problem:
everytime I call a method in a backing bean form pages inside WEB-INF, I have the error "Network connection interrupted" and, in firefox I see when I hover the button,…

aika
- 73
- 1
- 1
- 6
1
vote
3 answers
how can i have access to my files that placed in WEB-INF folder
i'm new to java and have a strange problem.
i create some folder(theme, js, css) in WEB-INF folder and put my files to this folders.
in index.jsp i use a css file by following way: