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

CONTRAST: Verb Tampering Weakness /WEB-INF/web.xml file

Getting Verb Tampering Weakness after scanning app with Contrast tool for in web.xml file. Code : Verb tampering Please suggest some solutions to avoid this vulnerability ? I tried couple of solutions like Replacing with . Removing but can't do…
0
votes
1 answer

JSF 2.0 javax.faces.webapp.FacesServlet mappig

I started to use JSF 2.0 recently and I don't understand completely how I need to configure the javax.faces.webapp.FacesServlet to correctly handle resources. For example, If I decided to create a web application with .xhtml files and .jsp files and…
filmac
  • 177
  • 2
  • 15
0
votes
0 answers

Why isn't my maven project appearing in Eclipse's 'Add and Remove' option for my application server?

With the newest versions of the jboss wildfly being compatible to the Jakarte EE 10 specs we updated our JEE 8 projects. In this process we updated all our components, but afterwards the newest verion of eclipse had a bugged handling of our…
0
votes
1 answer

Converting old php site to spring mvc while maintaining inbound links

I have an old php site that i'm in the process of converting to spring mvc, just for the fun of it. Now, on my php site the navigation links are in the following format: http://www.example.com/?p=blog and so on. I was thinking that i in my web.xml…
Trj
  • 657
  • 9
  • 21
0
votes
0 answers

Wildfly Java Application: Vulnerability to host header attacks on certain URLs

I have a Java application running on Wildfly. It was found that the application seems to be vulnerable to host header attacks on certain URLs. The application has several filters that should handle this but certain requests are not going through…
ijm3
  • 71
  • 1
  • 8
0
votes
0 answers

servlet mapping - url not found in tomcat

I have mapped the servlet correctly.. but still getting 404 error. Couldn't figure out the mistake. I have been trying to fetch json data from an api and store the data into mysql table when the user clicks the "Insert Data into table" button. I…
Kalyan cs
  • 1
  • 1
0
votes
0 answers

Servlet 4 web.xml schema: listener not found

Servlet 4 web.xml schema: listener not found.
eastwater
  • 4,624
  • 9
  • 49
  • 118
0
votes
1 answer

Using init-param in web.xml causes application to crash

I'm experiencing issues while configuring a servlet in web.xml of my application (Tomcat9, Java JAX-RS). After a lot of trial and error I managed to reduce the problem to the observation that having init-param tag present in web.xml somehow causes…
lewap02
  • 1
  • 2
0
votes
0 answers

Getting 404 ERROR! while connection .JSP file to Servlet

I am using Apache tomcat9 server My register.jsp file is properly rendering in the browser by when i am clicking to submit button after adding information in the form control is not getting transfer to servlet at all it shows 404 error onl!!! **here…
0
votes
1 answer

Why does Eclipse opens http://localhost:8080/de.vogella.jersey.first/WEB-INF/web.xml

I followed the following tutorial (although I installed Glassfish Open Source Edition, instead of Tomcat, and using Eclipse Indigo) : http://www.vogella.de/articles/REST/article.html. The webservice is ok, but when I "Run" the project from Eclipse,…
SCO
  • 1,832
  • 1
  • 24
  • 45
0
votes
1 answer

Tomcat 9 add webapi at runtime

I don't know if it's possibile . When I create a webapi I must declare in web.xml the related class/url myServlet /myServlet.htm
0
votes
1 answer

How to resolve "The Azure Key Vault url is malformed" exception

I have cloned the project - https://github.com/Microsoft/Partner-Center-Java-Samples/tree/master/secure-app-model/keyvault from GIT to my local Eclipse. Added tomcat server and when I run the partnerconsent project, I get this exception SEVERE:…
ab.it.gcp
  • 151
  • 1
  • 14
0
votes
0 answers

Dynamic Web Project Jersey Servlet: java.lang.ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer

I'm making a sample Dynamic Web Project with jersey servlet however I am facing this class not found exception. Here is the Stack Trace: Jan 19, 2023 3:33:24 PM org.apache.catalina.core.ApplicationContext log INFO: Marking servlet [WebService] as…
Shahzaib
  • 103
  • 1
  • 11
0
votes
0 answers

Not getting web.xml path

I recently changed my web.xml path from: src/main/webapp/WEB-INF/web.xml to src/main/webapp/WEB-INF/webXml/italia/web.xml the reason is I have to change for each profile the folder name for the country. The problem is java can't find the web.xml. I…
Alex
  • 85
  • 6
0
votes
0 answers

Tomcat8 redirect http://8080 to https://8443 not working - instead https://8080

We want to redirect http://8080 to https://8443 with Tomcat 8. Unfortunately we come accross the situation that http://server:8080is redirected to https://server:8080 instead of https://server:8443. I have updated server.xml as well as web.xml -…