Questions tagged [web-inf]

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.

185 questions
6
votes
1 answer

Embedding an H2 Database within the WEB-INF Directory

I have an embedded H2 Database I'd like to put in the WEB-INF directory of a web application. What is the proper way to refer to this in a JDBC url? Ideally I'd like a solution that would work both for a WAR, and an expanded WAR (If…
Doug
  • 6,446
  • 9
  • 74
  • 107
6
votes
3 answers

Java - How to access a file in the WEB-INF folder WITHOUT servlet context

I have a central class (RuntimeConfiguration) that holds around 100 parameters for my application. These parameters are taken from an XML file which I stored in the WEB-INF folder. On my development box, I hard-coded the path, but for very obvious…
siliconchris
  • 613
  • 2
  • 9
  • 22
6
votes
3 answers

JSF faces config file outside WEB-INF?

When creating multiple faces config files, it is correct to have the faces-config.xml outside of WEB-INF? The JSF spec does not seem to be very clear about this (Section 10.1.3) If yes, how should this faces-config.xml be declared in web.xml? the…
Debajit
  • 46,327
  • 33
  • 91
  • 100
6
votes
1 answer

Two Meta-Inf folders - normal structure?

I just "discovered" that we have two Meta-Inf folders ... In eclipse and also in the War file. The First one is (in the war): /META-INF/ The Second, and weird one ist: /WEB-INF/classes/META-INF/ In the second folder is a persistance.xml and a…
Nick Russler
  • 4,608
  • 6
  • 51
  • 88
5
votes
1 answer

Primefaces DialogFramework - How to show a dialog located in WEB-INF?

I am using Primefaces DialogFramework with Primefaces 5.0 Mojarra 2.1.27 Glassfish 3.1.2.2 Build 5 My problem is, that if the user knows the location of my dialog, he is able to access it directly via the URL. I do not want that to be possible, so…
stg
  • 2,757
  • 2
  • 28
  • 55
5
votes
2 answers

Using the google appengine maven plugin to deploy a Jax-RS war

I'm trying to make a simple base project to deploy a service I make using Jax-RS librarys to my Google app engine cloud space. The problem is that I don't know how to configure the plugin properly to not keep looking to a webapp directory under the…
5
votes
2 answers

Moving resources under WEB-INF

I have a web application that contains hundreds of HTML, JavaScript and image files. These files are located under the root directory: my_root-- -- html -- js -- images These folders contain some subfolders. From a security reason I…
Ronen
  • 807
  • 1
  • 13
  • 33
5
votes
1 answer

What is the difference between WEB-INF and /src/main/resources folders?

Which files "specifically" need to be in WEB-INF in a Spring 3 application which uses hibernate? I am also using Maven. Do certain files in /src/main/resources need to be copied to WEB-INF before the app is run in a production environment? Thanks!
Sam Levin
  • 3,326
  • 7
  • 30
  • 44
4
votes
2 answers

reference a css file in deployed webapp

I have deployed a webapp at localhost:8080/Project with Project being the context name. The webapp correctly redirects the user to the index.jsp. But the css file in this index.jsp is not found (Error 404). Index.jsp contains this reference:
Vjeetje
  • 5,314
  • 5
  • 35
  • 57
4
votes
2 answers

Standard Practice Of Placing JSP

Is it valid, standard and best practice to place publicly accessible pages be outside the WEB-INF folder such as index.jsp, home.jsp, store.jsp, login.jsp, registration.jsp... and secured pages like admin.jsp, reports.jsp, manageusers.jsp,…
4
votes
1 answer

Jetty 8: can a web fragment jar's /META-INF/resources/WEB-INF/classes directory contribute to the web app's classpath?

I created a Servlet 3.0 web fragment jar that contains a file: /META-INF/resources/WEB-INF/classes/com/foo/whatever/i18n.properties One of the Servlet Context Listeners enabled by the web fragment at app startup executes the following code: public…
Les Hazlewood
  • 18,480
  • 13
  • 68
  • 76
4
votes
2 answers

What is difference between adding jar to WEB-INF/lib folder & BuildPath

What's their(in buildpath jars and in WEB-INF/lib jars) duty? Thanks.
Utku Soytaş
  • 1,475
  • 2
  • 19
  • 30
4
votes
3 answers

How to get properties file from /WEB-INF folder in JSF?

I have some properties file in /WEB-INF. And I want to load it in a JSF managed bean. Is there any way to do that?
Roman
  • 64,384
  • 92
  • 238
  • 332
4
votes
2 answers

how to create files under /WEB-INF/

I am working on an application that stores files under /WEB-INF/someFolder/. But I dont find the right way to create files under this folder. I did this, but it is not working: File newFile = new File("/WEB-INF/fileName.xml"); When I try to…
Jason Bourne
  • 756
  • 1
  • 14
  • 34
4
votes
3 answers

How to dynamically update (hot swap) jars in a web-app?

I have a webapp in a war archive which is deployed on cloudfoundry. One of the libraries ("somelib.jar") used by the app is made by another developer. I would like a way for him to upload several different versions of somelib.jar and test the…
Jus12
  • 17,824
  • 28
  • 99
  • 157
1
2
3
12 13