web-inf

web-inf and jsp page directives

i have a number of jsp files under web-inf folder. Inside my web.xml i specify an errorppage for 404 amd 403 and java.lang.exception. Do i need to include a page directive for each of my jsp's or will they automatically get forwarded to the exception handling page because they are under web-inf? If this is true does this mean that jsps ...

How can I get at files in my WEB-INF folder?

Hi there. I'm running Java web app using tomcat and I want to read a properties file that's located in my WEB-INF folder. How can I get an InputSteam to this properties file so I can read it? ...

Is WEB-INF in the CLASSPATH?

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

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 paths generated by IDE's (like Eclipse/JDev) generally use something like: <context-param>...

Problem with moving JSPs under WEB-INF directory

Hello 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 ...

Error moving JSP file into WEB-INF directory with Stripes

I have the following Stripes ActionBean: package myapp; import net.sourceforge.stripes.action.*; public class WelcomeActionBean extends MyAppActionBean { @DefaultHandler public Resolution view() { return new ForwardResolution("/welcome.jsp"); } } When I load /myapp/Welcome.action in a browser, the contents of welc...

How to acces a file under WEB-INF from a Java web application

Hi! 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 jar is stored in WEB-INF/lib folder. ...

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 what is equivalent to creating a "Dynamic Web Project" that I do in Eclipse. Do I need t...

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 websphere or tomat etc ...) ...

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 java.lan.NoClassDefFoundError. I suspect that the jars under the WEB-INF/lib directory within ...

Java WebApp: Loading resource from .jar located in WEB-INF

There are a lot of similar questions, but, probably, mine is a little bit different: What is the right way to load resource from inside of .jar file located in WEB-INF/lib folder (if I know the jar file name and the name of the class it resource belongs to), while Web Application is running? Should I use getServletContext().getResourceA...

tomcat not compiling WEB-INF/libs?

[irrev] I keep making guesses and asking accordingly as to what's wrong here, so take that under consideration. The project I'm working on is setting up a web application, the source of which was sent to us by a chinese company as a portal for the hardware we're buying from them, so a language and time-zone barrier prevents effective co...

Set path in web.xml relative to WEB-INF

Hi, I want to set a path in my web.xml which is relative to the WEB-INF or the WEB-INF/classes. However, the following code (repository.home) seems to pick up a path relative to c: root drive path on my windows machine here. <servlet> <servlet-name>ContentRepository</servlet-name> <servlet-class>org.apache.jackrabbit.servlet.j...

Spring configs for webapps -> location in WEB-INF mandatory?

Hi all I have just finished building my up from bottom (database) over DAO and business layer. Now I am getting warm with the presentation layer for which I chose Spring MVC. I have checked out the example delivered with spring-webflow-samples/booking-mvc. I was wondering why all spring configs are located in webapp/WEB-INF/config rat...

How to load StringTemplateGroups from the WEB-INF directory of a web archive

Hello everybody, this question is somewhat related to this question: StackOverflow: Howto load a resource from WEB-INF directory of a web archive I want to use StringTemplate and want to load my templates via a StringTemplateGroup. Until know I use the method shown in the related question to get single files from the WEB-INF folder, b...

JSF files inside WEB-INF directory / Model 2 Pattern

Hi, I want to put my JSF 2.0 xhtml files under WEB-INF\jsf. How do I access them then? I know that anything inside WEB-INF isn't exposed to the outside, so I need a controller to redirect me to the corresponding jsp, right ? (This is also the model 2 pattern iirc). Can I achieve this with a parameter inside web.xml/faces-config.xml? I...