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

Integration of web.xml file in Spring Boot project

I'm a junior Spring Boot developer and I have issues with integration of web.xml file in a project. Is it possible to add that XML in my project without destroying my old configuration?
0
votes
1 answer

grails - command not found install-templates

"grails run-app" is functioning normally, But "grails install-templates" did not run. My version of Grills is 3.3.8. ( The purpose of this is to create web.xml. ) thanks!
0
votes
0 answers

How to filter requests from only application context path?

Environment: Jboss 5.2 Servlet 2.4 Java 7 I'm trying to execute a filter requests when the application context path is called but I didn't find any way with url-pattern. I would like to execute a filter when request this url…
Joe
  • 7,749
  • 19
  • 60
  • 110
0
votes
0 answers

How to call a method in a jar file from a jersey web project?

I've created a Maven Project (eng_comparison) in Eclipse IDE, with jersey-quickstart-webapp archetype. EngComparator.java package com.zoo.web.eng.eng_comparison; import java.io.FileNotFoundException; import java.io.IOException; …
0
votes
0 answers

web.xml - dynamic instead of hardcoding - is it possible?

Is it possible to save yourself a lot of work by dynamically pass an exception type (or error code) in web.xml instead of "classic" hardcoding? For example use something similar to * instead of…
xyzt
  • 59
  • 6
0
votes
0 answers

How can I introduce path variables in weblogic.xml from web.xml?

I am using Weblogic 12c to deploy my springboot application. I am trying to introduce path variables from web.xml into weblogic.xml so that I will only have to modify one file [web.xml] rather than two files [web.xml, weblogic.xml] when deploying to…
Kirtana D
  • 3
  • 3
0
votes
1 answer

Why the spring scheduler is loading twice?

Recently, I have faced the problem related to scheduler as it is loading twice. I put a lot of effort to solve it but not able to fix it. Every question I found related to this question said it's an issue related to spring as scheduler load twice…
user11157805
0
votes
2 answers

tomcat cannot find the servlet at the package path

There is my servlet in "java" directory: @WebServlet("HelloWebServlet") public class HelloWebServlet extends HttpServlet { private HttpServletRequest request; private String title = "Servlet test app"; public void doPost(HttpServletRequest req,…
Yury Finchenko
  • 1,035
  • 13
  • 19
0
votes
1 answer

org.springframework.web.servlet.PageNotFound noHandlerFound No mapping found for HTTP request

I am stuck at this point, unable to find the exact of reason.However,I found many similar question but still my issue doesn't seems to be resolved.I am running it in sts 4 and added a tomcat server 9.0 to run it locally.Most near question which I…
Pratyush Mayank
  • 173
  • 1
  • 1
  • 10
0
votes
1 answer

How should I load servlets from web.xml with embedded jetty?

I am trying to migrate my application from tomcat to embedded jetty. I have created an entrypoint in web module following some guides (this, this, this and etc...). Resulting file is presented below: import org.eclipse.jetty.server.Server import…
likeanowl
  • 35
  • 1
  • 10
0
votes
1 answer

WebSockets (ServerEndPoint) configuration

How are you? I have a problem that I'm looking for a definitive answer for long days without success and because this I came here to ask for your help! Some informations: Java Web Project, with JAVA 8, Tomcat 8.5.23 and IntelliJ as my UI. The…
0
votes
0 answers

injection of environment variables with default if not set or empty

I'd like to use something similar to the following in my web.xml: ${CONF_DIR:config/files}/my.xml but I'd like to use the default not only if $CONF_DIR is not set but also when it's empty string.
Gavriel
  • 18,880
  • 12
  • 68
  • 105
0
votes
0 answers

How to manually foward a HTTP request to the default Faces Servlet

I would like to be able to receive a request on a servlet I made, then analyse the URL and configure the application database based on that, and after the DB is configure forward the request to the regular Faces Servlet. How should I configure my…
Alexandre Krabbe
  • 727
  • 1
  • 13
  • 33
0
votes
1 answer

How to configure logback context-param using jHipster?

Fact 1: in this answer it is mentioned that the web.xml file has been replaced by the (generated) WebConfigurer class. Fact 2: in the logback documentation it is explained that, in order to avoid the logback facility shutting down before the…
0
votes
1 answer

Why i can't change the version of the project faclet?

I have simple project that implements the CRUD action on a local db, using both Spring and hibernate, but as soon as i add the project to the apache tomcat server (ver. 8.5.45) eclipse shows the following: "Cannot change version of project facet…