Questions tagged [web.xml]

The web.xml is the web deployment descriptor file of Java Servlet based web applications. It allows you to define, declare and configure the Servlet API based implementations in your web application, such as servlets, filters and listeners.

A deployment descriptor (DD) refers to a configuration file for an artifact that is deployed to some container/engine.

In the Java Platform, Enterprise Edition, a deployment descriptor describes how a component, module or application (such as a web application or enterprise application) should be deployed. It directs a deployment tool to deploy a module or application with specific container options, security settings and describes specific configuration requirements. XML is used for the syntax of these deployment descriptor files.

For web applications, the deployment descriptor must be called web.xml and must reside in the WEB-INF directory in the web application root.

Further Reading:

2074 questions
0
votes
2 answers

config issue jsf with jboss 6

I have set up a project that I deploy to Jboss 6. It is a war file with a bunch of xhtml files. After several hours of searching and increased frustration, I was hoping that someone with more experience with jsf config would be able to help…
user899757
  • 351
  • 2
  • 4
  • 21
0
votes
1 answer

Display error page once the session is expired in SpringMVC

In my Spring MVC application I have to display a Error page once the session is invalidated. For session invalidation , I am using the following code : 1 In this…
Goutham
  • 80
  • 12
0
votes
2 answers

web.xml security constraint configuration not considering URL query string

I am running a web application in Tomcat server (OSGI based). I want to restrict the user from accessing URLs like http://localhost:53307/myapp/servlet/startPage?PAGEURL=../../myapp/x/y/license.txt I've configured web.xml as …
javalearner
  • 3,314
  • 7
  • 26
  • 33
0
votes
0 answers

Calling welcome file servlet results in java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher

I'm getting a ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher while calling servlet as a welcome file. Below is the web.xml:
0
votes
1 answer

Annoying "Resource not found" warnings on my web.xml with Eclipse Indigo

I have two custom url mappings for error pages (500 and 404) using PrettyFaces. On my web.xml I have these two error page rules: 404 /not-found
ramsvidor
  • 1,480
  • 1
  • 14
  • 19
0
votes
1 answer

the correct order of filters in web.xml for a grails application

the web.xml of my groovy application has some filters, filtermappings, servlet mappings, listeners defined in the following exact order:
pri_dev
  • 11,315
  • 15
  • 70
  • 122
0
votes
1 answer

Spring mvc web.xml error

I'm trying to write a web application using Spring MVC. I have a configuration in the web.xml that maps some URLs that are in my code: @Controller @RequestMapping(value = "app") public class AjaxHandler { /** * Instance of Logger */ …
Alexander
  • 261
  • 2
  • 16
0
votes
1 answer

Error location always from root of site?

I have this XML in my web.xml file: 404 /error/html/404 If I go to a page like /indexer (which doesn't exist), then I get redirected properly to the URL…
Nik
  • 7,113
  • 13
  • 51
  • 80
0
votes
1 answer

auto invoke main servlet through welcome file list

The following web.xml doesn't seem to work: MyServlet *.wfn
Erwin Smout
  • 18,113
  • 4
  • 33
  • 52
0
votes
1 answer

how to Open HTML page of subdirectory when URL is hit- using java web.xml

I have a scenario that when user opens http://MYWEBSITE.com/abc/ , the user is directed to xyz.html page which is in abc subdirectory. I am using Java for web development. How can I do this in web.xml? P.S. URL is http://MYWEBSITE.com/abc/ not…
user958414
  • 385
  • 1
  • 5
  • 10
0
votes
1 answer

wicket 1.5 + error-page + cannot find the related path to css resources

I have the next problem with wicket and standard error handling: all the css files are stored as java resources, near the html pages. It's working fine. But, when I added the 404 error handling in the web.xml so that any not-found-url is treating as…
javagirl
  • 1,635
  • 6
  • 27
  • 43
0
votes
0 answers

IntelliJ all of Controllers could not autowired all of Services after context seperation

I'm using IntelliJ Ultimate 2019.1.3. few days ago, I fixed the setting for Transaction. but after that, every controllers show up this error(red underlines). [ Could not autowired. No beans of '~~Service' type found. ] however, it works fine. so…
0
votes
1 answer

how can i exclude from DispatchServlet mapping a folder (resources folder)

My web.xml is: http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> TestStruts2 dispatcher
Iosif M.
  • 83
  • 1
  • 6
0
votes
0 answers

What time servet initialize?

I have a doubt about loadonstartup value. I check it within the stackverflow previous answers also. but some are said load on startup value zero mean initialize the servlet when deploy the application. but some are said zero mean it doesnt load when…
0
votes
0 answers

Is there any way to avoid passing previous request query string parameters to authentication forward call in tomcat?

i have below login configuration in my web-app/WEB-INF/web.xml CUSTOMFORM856 /myAuthenticator