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
1 answer

Is there any way to inject a variable into a web.xml?

I have web app by using Java EE. I want to run my app for different URL. My app consist of many project and in main project I have web.xml file that decides about URL path. I want to inject form other file like config.xml, a variable to web.xml. Is…
Pawel Nackiewicz
  • 219
  • 3
  • 10
0
votes
1 answer

How to configure Spring errror page in JSON format with web.xml and an error controller

With Spring 5, I am currently able to configure an error page in src/main/webapp/web.xml, i.e. the following configuration is added: /WEB-INF/error.html In this way, the error.html will be…
Rui
  • 3,454
  • 6
  • 37
  • 70
0
votes
1 answer

SpringMVC Configuration

I am trying to configure spring-mvc application context but I having some issues running the generated war file in JBoss. I get the following error "java.lang.RuntimeException: org.springframework.beans.factory.BeanDefinitionStoreException:…
user95488
  • 129
  • 2
  • 11
0
votes
1 answer

Configure Spring REST Controller without DispatcherServlet

I want to setup Rest Controller using Spring without DispatcherServlet. I have worked with Rest Controller with Spring MVC's dispatcher servlet but I am not sure how to setup controllers without it. Below is the code that I…
damndemon
  • 331
  • 3
  • 11
0
votes
1 answer

How to link external css in java servlet?

I have a report.jsp page which looks like below (NOTE: I have just added codes which are necessary).
Organization name:
sä-röze
  • 13
  • 1
  • 7
0
votes
1 answer

Jersey web.xml to annotation based configuration along with HK2 binding

How to migrate web.xml based configuration to annotation based configuration using Jersey along with HK2 binding.
Waqas Ahmed
  • 1,780
  • 1
  • 14
  • 15
0
votes
0 answers

How to export data sources in Weblogic 12.1.1

I am running a Linux Red hat and am currently in process of replicating a running WLS server and one problem I have come to is having to recreate data sources. the pack/unpack command does not satisfy my needs, as it does not export data sources. I…
Marius
  • 55
  • 1
  • 8
0
votes
0 answers

Maven-war-plugin fails during mvn install execution due to web.xml is not found

I am trying to make a simply "mvn clean install" execution in a Maven project but it fails with this error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war->plugin:2.2:war (default-war) on project xxxx: The specified web.xml file…
Idles28
  • 47
  • 2
  • 2
  • 12
0
votes
0 answers

java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found

I am using tomcat 7 in eclipse(not maven). X project is working fine but when i am running Y project(dynamic web project) it is giving following error. I have tried many solutions like cleaning project and every possible solution that i found in…
rohan
  • 151
  • 1
  • 7
0
votes
1 answer

Issue calling a JavaScript function in google appengine web app

I'm trying to call a JavaScript function located in a separate .js file, but for some strange reason, it doesn't work. I literally tried all the possible relative paths and locations of .js file but nothing helped. This works fine:
0
votes
1 answer

issue with deployment descriptor

I am trying to load an application to my local tomcat instance. When I input the address into the URL bar after starting tomcat I'm getting 404-not found error even though the resources were there. I did a lot of trial and error and found something…
RKodakandla
  • 3,318
  • 13
  • 59
  • 79
0
votes
0 answers

top domain .world not working in java struts 2 app

I have pointed my domain analytix.world to my java struts 2 web application, The pointing is absolutely correct, as I have tested with a test.php web page. but when I am trying to open struts action it is saying 404 What I believe is that web.xml…
Prashant
  • 17
  • 1
  • 6
0
votes
1 answer

how to set jsf welcome page with request param

I want to use this as the welcome page for my JSF Java EE 8 web application channel.xhtml?handle=mehdi However it shows me the 404 custom page I set up. I think it looks for…
usertest
  • 2,140
  • 4
  • 32
  • 51
0
votes
1 answer

cookie config issue when switching between https and http

Am using Jetty 9.2.25 which has Servlet 3.1. I have below cookie configuration in my web.xml true false When I set this secure flag as true,…
Suman
  • 21
  • 2
  • 6
0
votes
1 answer

Tomcat alias - cannot find WEB-INF/web.xml

I have setup aliases under tomcat in my server.xml as follows: This works fine except when navigating to more than one folder deep as…