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

Description Resource Path Location Type Error while downloading 'http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd' in eclipse

In my project's web.xml file, I'm defining configuration like this
demir5334
  • 215
  • 7
  • 17
0
votes
1 answer

How to pick an element from .XML file in MS edge browser

I am trying to get a value(Identifier in my case) from XML to pull some logic rules for a web app. I have managed to get my JavaScript to work on Firefox & Chrome but for Edge, instead of picking an element(Identifier) it's picking an element…
Omi
  • 1
  • 1
0
votes
1 answer

How to Re-direct to API index page when accessing API Base Path?

I am developing a Java Dynamic Web Project with a REST service. http://localhost:8080/fire_monitor loads the index.html . But I want http://localhost:8080/fire_monitor/api also to be redirected to index.html. How can I accomplish this from web.xml…
0
votes
2 answers

How to write web.xml and persistence.xml to connect Java EE to DB Server

I aim something very simple - create an empty maven, download in pom - javaee-api, and then to connect this simple maven EE project - to DataBase Server - currently my local machine's MySLQ Server. I also aim to keep it simple - only with web.xml…
0
votes
1 answer

How to load servlet as first page in jsp application manage other servlets

I wanted to load a servlet as the first page in my simple jsp appication. Therefore I added the servlet in this URL mapping. StudentController
Dil.
  • 1,996
  • 7
  • 41
  • 68
0
votes
1 answer

Embedded Tomcat 7.0.99 is forcing default welcome files into context

I am upgrading a Spring/Angular application from Tomcat 7.0.59 to 7.0.99. I am using an embedded Tomcat server and running the app from the command line ("tomcat7:run-war"). The problem is that default welcome files are being added to the context…
0
votes
1 answer

Web Dynamic Project in Eclipse shows Error:404 for any other page after index.html

I created a Web Dynamic Project and generated a web.xml file. Then I copied my servlet from a website and changed it's specifications to my project's specifications. I copied the web.xml and servlet in WebContent folder by mistake but the project…
Shashank Gupta
  • 315
  • 1
  • 4
  • 16
0
votes
1 answer

Get parameter from jax-ws web service

I would like retrieve String parameter from a file in a web service (jax-ws). I've see that I can't read parameters from web.xml using FacesContext. This code don't work: fc = FacesContext.getCurrentInstance(); String fileOpzionali =…
0
votes
1 answer

Error Page configuration in web.xml for JSF application

I have tried to configure error page in web.xml using error-page element, but the error page is never shown rather the exceptions are thrown out in raw form to the user viewing the application. What should I do about it? I have not found any clue as…
muasif80
  • 5,586
  • 4
  • 32
  • 45
0
votes
1 answer

why the spring ioc + struts 2 not work after add spring security 3 support

After I add the following into web.xml to support spring security 3. the spring ioc + struts2 not work, when struts2 point to a bean, system can not search the bean definition in applicationContext.xml, it just shows me Class Not…
MemoryLeak
  • 7,322
  • 23
  • 90
  • 133
0
votes
0 answers

Concat env-entry in web.xml

My web.xml looks like this: sielae_url https://www.bidiso.es/sielae/ java.lang.String
David Antelo
  • 503
  • 6
  • 19
0
votes
1 answer

Wasm file served with wrong Content-Type header by Quarkus

I need Quarkus to serve my wasm file with Content-Type header application/wasm instead of application/octet-stream. I explicitly use the quarkus-undertow extension. First I tried to use the undertow-handlers.conf to set the content type like…
Michael Kleimann
  • 502
  • 2
  • 10
0
votes
0 answers

java.lang.ClassNotFoundException: org.glassfish.hk2.Module from GlassFish server during deploy

I'm trying to build a REST webservice and I'm using the web.xml build architecture, with pre-3.0 servlets. This is my web.xml: JAX-RS endpoint - JLWS04Serv
0
votes
2 answers

How to migrate in web.xml to spring class based configuration (WebApplicationInitializer)

In our current XML based configuration, we have below configuration in web.xml to disable non-ssl(HTTP) protocol access. SecureConnection
Ram
  • 423
  • 4
  • 26