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

access permissions for specific users for some pages under tomcat

I was trying to grant access to a project for a specific user only, I saw a way within changing web.xml The app is accessible also for all RnD users using LDAP, and it's working very well I'm trying to block TEST project for other users and only…
Basel Zarka
  • 23
  • 1
  • 4
0
votes
0 answers

Difference between spring.session.timeout property and tag in web.xml

Trying to store my HttpSession using Redis in Spring Boot. All guides mention session timeout properties - like spring.session.timeout - and previously I used to define timeout in web.xml. Can't figure\find out the difference between those two. When…
Collapser
  • 1
  • 1
0
votes
0 answers

How do I configure two instances of log4j2 to work in a Spring 5.3.18 project via web.xml file, hosted on Tomcat 9

I need to use two separate log4j loggers in my Spring project running on tomcat 9. I started by getting the dependencies and placing in my pom.xml: org.apache.logging.log4j
0
votes
0 answers

In a GlassFish web application, HTTP to HTTPS redirection works only the first time the http link is accessed in Internet Explorer

We have a GlassFish 4.1 web-application with SSL and port unification configured in domain.xml. We cannot use built-in authentication mechanisms like BASIC, FORM, CERT-CLIENT. Instead, we use a custom login form (using the Stripes framework -…
0
votes
0 answers

@Webservlet annotation and web.xml welcome file

I have a project named balance and this is webservlet annotation of "Security.java" file. This is my webservlet. @WebServlet({ "/login", "/logout" }) and this is my welcome file.
0
votes
1 answer

Vaadin configuration with BIRT

I'm useing Vaadin and BIRT reporting in my project.I have problem with accessing report with Vaadin,I think its related to my web.xml configuration.Can anyone help me to get out from this problem?? < /servlet-mapping> …
123Ex
  • 906
  • 2
  • 21
  • 34
0
votes
0 answers

Server fails to start due to java.lang.NoClassDefFoundError

I'm trying to start my tomcat server but it fails and gives me org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class…
Kai-Eiji
  • 75
  • 6
0
votes
0 answers

Log4jConfigListener cannot be resolved in web.xml

I'm trying to run a spring application with gradle, but I face this error java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener I believe the issue is that in my web.xml file I have a block
Kai-Eiji
  • 75
  • 6
0
votes
0 answers

parameter binding in web.xml

I want to set the CORS Filter value by reading from properties file. CORS Filter org.apache.catalina.filters.CorsFilter corss.allowed.origins **ALLOWED_ORIGIN_LIST** I want to set the CORS filter value by reading from properties…
0
votes
2 answers

Servlet Mapping fails

Now I have the following problem: I am trying to create a website using Tomcat 7 and JSP. But I am not capable of configurating the server properly. I want a website that shows in the browsers address-bar something like mydomain.com/about without…
mxcd
  • 1,954
  • 2
  • 25
  • 38
0
votes
1 answer

Add web.xml file inside React war file

I'm trying to deploy a React app in Jenkins using Tomcat 9. Everything is working except when I try to enter an invalid route in the browser's address bar. It only displays the Tomcat 404 page instead of my custom 404 page. The solution I found in…
atan
  • 58
  • 2
  • 10
0
votes
0 answers

Authorization for multiple endpoints not working in keycloak-18.0.1 after migrating from keycloak-3.1.0.Final

We have 2 endpoints out of which one is working fine and other is not as required after migrating to keycloak-18.0.1. In web.xml we have added 2 endpoints. This endpoint is working fine as it ask for authorization. This endpoint is mapped with…
0
votes
0 answers

How to convert this part of web.xml to Java configuration

i want to convert this: SassCompiler com.darrinholst.sass_java.SassCompilingFilter SassCompiler
0
votes
0 answers

Keycloak - How to Bypass Authorization with client having Resources and Authorization Scopes?

Version: Keycloak 18.0.1 Following use case is Working Fine for me: (When i access swagger URL, which is ignored in web.xml, then it successfully bypass authentication) Case 1: Success Use Case: Client API with No Authorization Scope &…
fatherazrael
  • 5,511
  • 16
  • 71
  • 155
0
votes
0 answers

Add context value into web.xml

I have an application where i defined the location to the external log4j2.properties. I have defined the Log4jServletContextListener in the web.xml and if i provide a path to the file it works. I am trying to figure out how to use a place holder and…