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
0
votes
2 answers

Read properties file from WEB-INF folder

I want to read properties file from WEB-INF folder and not from the classpath since I dont want to compile my application again if I make any modifications. My file is coming in build in the directory but when I am trying to acces its not showing…
Jarvis
  • 503
  • 2
  • 5
  • 17
0
votes
0 answers

Create folder under WEB-INF in Web Application

What is the correct way to create a folder under MyProject/src/main/webapp/WEB-INF/myfolder dynamically? I have been trying to use: @Autowired ServletContext sc; ... String path = sc.getRealPath("WEB-INF"); File file = new File(path +…
0
votes
2 answers

how to move xhtml from /web/ to /web/WEB-INF/?

how can I put the xhtml files in WEB-INF so that only the application has direct access to them? Specifically, so that the bird pages aren't directly publicly accessible. The project is from an apress example. project…
Thufir
  • 8,216
  • 28
  • 125
  • 273
0
votes
2 answers

local tomcat with eclipse attempt to run jsp

I have local tomcat running. I have eclipse loading contexts to this tomcat instance. I have a jsp under webappl, which I redirect to in servlet, and which I can access at :8080/mywebapp/my.jsp. If I create a directory under webappl/alljsps , and…
Paul
  • 608
  • 1
  • 9
  • 23
0
votes
1 answer

Loading resources in Tomcat

I am trying a simple web application in tomcat 7. It has a javascript call in the index.html which loads a properties file. Using the below code to make a get call, var req = new XMLHttpRequest(); req.open("GET",…
Victor
  • 1,207
  • 2
  • 13
  • 21
0
votes
1 answer

WEB-INF/lib jars not found in JBoss 4.0.2 war deploy

I have a simple web application (one jsp and one servlet) file that I've copied into jboss-4.0.2/server/default/deploy folder and it has successfully hot deployed as I can access the jsp page. However, when I invoke the servlet, I am getting a…
0
votes
1 answer

Load from code file from web-inf\lib\*.jar

How to load (from code) required file (*.txt) from WEB-INF\lib\someName.jar? I tried mechanism: this.getClass().getClassLoader().getResourceAsStream(). But it worked only when required file was in WEB-INF\classes folder. Then i tried to…
slider
  • 421
  • 1
  • 4
  • 19
0
votes
2 answers

what jar's should Web Component WEB-INF LIB should contain in a war file

is web-inf/lib should contain only application specific jar's or deployment environment specific jar's also as per J2EE standards. Note : war file is not making use of any deployment environment specific functionality (for instance weblogic or…
Laxmikanth Samudrala
  • 2,203
  • 5
  • 28
  • 45
0
votes
2 answers

exclude WEB-INF from a maven generated war

How do I prevent the WEB-INF directory from being included in the .war package? This does not work. org.apache.maven.plugins maven-war-plugin 2.1
user3731460
  • 334
  • 4
  • 14
0
votes
0 answers

Gradle - JARs copied into WEB-INF getting overwritten by GoogleAppEngine?

I'm currently using Gradle to compile and upload my Java code to GoogleAppEngine. It compiles fine locally, the problem is that the JAR libraries that the code is dependent upon are not within the "WEB-INF" folder on GAE. I'm currently using War to…
0
votes
2 answers

Web Services in Unix. What should be the directory structure

I earlier got to create a simple RESTful webservice on my localhost using Eclipse IDE, Tomcat, and JAX-RS libraries. I am now trying to move the same on to a different unix server which has Tomcat installed. I am not knowing how to get started as in…
Sashi Kiran Challa
  • 905
  • 1
  • 11
  • 21
0
votes
2 answers

Can't access to WEB-INF/folder/folder/file.jsp

I'm developing a little servlet with eclipse on a Tomcat server. From this servlet I want to include some jsp files, it works perfectly for the file WEB-INF/website/NewFile.jsp But when I try to get a jsp file in /WEB-INF/website/common I get…
Kotaw
  • 3
  • 1
  • 3
0
votes
1 answer

How to access static resources(WEB-INF) folder from and write tests for it

I need to load a file resource when starting my server. So I placed the file under webapp/WEB-INF. The problem is that the unit tests fail. I try to load the file using: URL url = Utils.class.getClassLoader().getResource(fileName); File file =…
special0ne
  • 6,063
  • 17
  • 67
  • 107
0
votes
1 answer

Eclipse deploys content of WebContent folder to WEB-INF folder.

I encounter a strange behaviour of the Eclipse Run on Server feature. My environment: Eclipse Kepler SR 1, WTP Apache Tomcat 7.0.37 I have two dynamic web projects inside Eclipse - ProjectA and ProjectB. Both have an index.xhtml file (indeed both…
0
votes
1 answer

Web fragments (Servlet API 3.0) - Also modular resources in WEB-INF directory

According to Servlet 3.0, a JAR placed in WEB-INF/lib has static content from its META-INF/resource directory accessible from the web-context root. The specification doesn't say anything about modular resources, which should be accessible from the…
Ginkgochris
  • 455
  • 4
  • 25