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

How to make welcome page unprotected for form based authentication in websphere

My welcome screen is kind of home screen of any website (should be unprotected resource). Say http://domain:port/myApp which redirects to the jsp file configured in welcome-file-list of web.xml say welcome.jsp. But on click of any link present on…
0
votes
1 answer

Multiple annotation found at this line in web.xml file

I am new to spring mvc while am creating an sample app I have an error in web.xml file. This is my web-app tag:
Terrible Coder
  • 880
  • 9
  • 10
0
votes
1 answer

jsf override default javax.faces.STATE_SAVING_METHOD for concrete view

javax.faces.STATE_SAVING_METHOD parameter in web.xml is used to specify where the state should be saved. client or server If you want to save the state on the server (which is the default in the JavaServer Faces reference implementation), specify…
Jesus M C
  • 341
  • 2
  • 8
0
votes
1 answer

Security constraint causes 404

I'm trying to secure part of my Resteasy rest services by adding Keycloak bearer-only token verification to my webapp. In my web.xml I added:
Cloud
  • 458
  • 1
  • 13
  • 34
0
votes
1 answer

How to configure url-pattern under security domain in web.xml from java at runtime?

I have security domain configured in web.xml as: all all ${param-name
viv kumar
  • 252
  • 4
  • 13
0
votes
2 answers

How to specify common error page excluding 404 and 500 in web.xml

I already have two web pages designed for 404 and 500 error pages in web.xml 404 /WEB-INF/error/404.jsp
Dil.
  • 1,996
  • 7
  • 41
  • 68
0
votes
1 answer

Clarify my servlet mapping error in web.xml

Can some one let me know what is wrong in this web.xml servlet mapping? It gives 404 error code when I deployed the app in tomcat. Figured its coming after I made a new servlet mapping for AdminUserManagerServlet. Can some please tell me what is the…
Ushani
  • 1,199
  • 12
  • 28
0
votes
2 answers

How to verify custom error screen for error type 5xx or 4xx

I have created a custom error screen for any http 5xx or 4xx error by using error-page tag in web.xml but what should be best approch to verify. I am able to verify for error type 401 and 403 but no idea for other error.
Technogix
  • 77
  • 13
0
votes
0 answers

Welcome page of the tomcat does not change

My welcome page in web.xml file is index.jsp, when I updated the index.jsp file by my content manager servlet, the changes to index.jsp did not appear in welcome page and I still had the old contents. how can I fix this problem and update my welcome…
Gareth
  • 11
  • 2
0
votes
1 answer

Struts2 application which runs successfully gives error when deployed to weblogic 12 c

I have Struts 2 (2.3.32) project which was running successfully in local but when I deployed to Weblogic 12c it is giving following error (in screenshot ) HTTP:101064, cvc-complex-type.2.4b ..... Also I have upgraded this struts application from…
Pankaj K
  • 1
  • 1
0
votes
1 answer

How to Support both index.html and "/" Servlet Mapping

I have the below two servlets and an index.html page in the root of my Java web app. The index.html page collects some data inserts it using the Insert servlet and then gives the user a URL to retrieve the data (i.e. http://localhost:8080/12345). I…
c12
  • 9,557
  • 48
  • 157
  • 253
0
votes
1 answer

Reading System Properties in Web.XML

in order to access global values stored in the file src/resources/settings.properties from web.xml on a JBoss EAP 7 Server, I implemented the following class from a similar Stack Overflow topic: public class ConfigurationWebFilter implements…
Knight
  • 53
  • 1
  • 5
0
votes
0 answers

ClassNotFound exception despite every file is correct

I have this JSP form:
Name:
The following is my XML file:
0
votes
1 answer

How to link a servlet as a directory+servlet Web.xml?

Basically I have a servlet say: gubis. To be precise: I need my gubis servlet be accessed as servs/gubis The goal I want to reach is that if I made the request as localhost:8080/EclipsePro/servs/gubis the request should be redirected to…
Whatever
  • 125
  • 2
  • 2
  • 8
0
votes
1 answer

Exclude a page from session timeout in web.xml

I'm just wondering, is it possible to exclude a page (say, the login.jsp) from session timeout in web.xml?
Wen Ping
  • 345
  • 4
  • 12