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

Set default protected welcome page in Spring MVC project

I have a Spring MVC project and I would like to set a welcome home page that is protected by a login. The result of my configuration is that normally if I ask a URL like: http://localhost:8080/angularjava/app/homepage.html the server present me a…
0
votes
0 answers

Why does Intellij copy and overwrite my filtered web.xml when using tomcat run configuration?

I'm working with a Maven Webproject and Intellij IDEA (2018.2). The web.xml is being filtered by Maven (it contains two placeholders which are being filled through Maven Resource filtering, e.g.…
Vortilion
  • 406
  • 2
  • 6
  • 24
0
votes
1 answer

load on startup negative value in liberty

I am currently migrating my application from WAS 8 to WAS Liberty, and I am stuck with the below problem. In one of my module web.xml file, the servlet load on startup value is -1. And the particular servlet is not getting invoked while running in…
Venkatesh
  • 31
  • 1
  • 7
0
votes
1 answer

How to set a condition for different servlets in web.xml

I am new in Servlets and web.xml content. I would like to set a condition/dependency on two different servlets. Consider I have below two servlets: servlet1
Psyduck
  • 84
  • 2
  • 9
0
votes
1 answer

Tomcat 8.5 context path not working correctly

I have an application with the name cat_tiger.war that gets deployed as localhost:8080/cat_tiger but I want to change the context path to localhost:8080/cat/lion/ instead. I've added the META-INF/context.xml file as
GrizzLee
  • 3
  • 1
  • 1
  • 4
0
votes
1 answer

defining the connection scope of a whole maven project - spring mvc

I know it is possible to define the scope of the beans, but I am wondering is it possible to define the scope of the whole project? I have a Web Service project which only provides services to other projects and they form an application together.…
sticky_elbows
  • 1,344
  • 1
  • 16
  • 30
0
votes
0 answers

Web.xml as Error page by default

web.xml as error page I am using Dynamic project in eclipse And Annotations for jsp, servlet mapping in servlet pages and i am getting error in web.xml file but it not showing the error and when i run my project getting error as 404 i not used…
Chandu
  • 73
  • 6
0
votes
2 answers

Mapping role-names to from roles

I configured a LDAP realm for tomcat 7. It searches for someone in the group users, once found will authenticate them and allow them to access the application. This is my realm:
C. Smith
  • 172
  • 1
  • 4
  • 16
0
votes
0 answers

Keeping Web.xml in a migrated application from struts2 application to Spring boot

So, I'm trying to migrate a simple struts2 application into spring boot, and I already achieved that by registring the StrutsPrepareAndExecuteFilter as a bean in my Application.java The problem is that my client wants to migrate a web application…
Faouzi
  • 929
  • 2
  • 15
  • 23
0
votes
2 answers

can i put the form-login-page html in a library for a webapp?

I was trying to create an app with login page authentication. And for the same i added into the web.xml (as shown below). I jar'ed the logon.html and logonerror.html , and added them as a library along with the .war webapp file.…
Tom
  • 135
  • 1
  • 5
  • 14
0
votes
1 answer

ContextLoaderListener trigger applicationContext.xml file not found

I do not have applicationContext.xml. I don't need it. This is my web.xml file: org.springframework.web.context.ContextLoaderListener
zelenooq
  • 137
  • 1
  • 1
  • 10
0
votes
0 answers

WebXmlMappableAttributesRetriever webXmlInputStream missing in spring security 4.2.0

In Spring Security 2.0.7, I am configure the WebXmlMappableAttributesRetriever as follow:
Panadol Chong
  • 1,793
  • 13
  • 54
  • 119
0
votes
1 answer

{ "readyState": 0,"status": 0,"statusText": "NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://localhost:8088/'." }

I am trying to hit PaymentController.java via ajax request it is giving me the error shown in attached screenshot. I have tried alot but not able to hit the controller. My motto is to hit the controller and get the returning string. The error that…
0
votes
1 answer

Configure same error page on two different paths?

I'm trying as simply as possible to deal with error handling in a "forked" JSF2 application, which has separate templates and XHTML page paths for mobile and desktop. The main servlet mapping (maybe in need of modification) currently looks like…
0
votes
0 answers

I wanto call a servlet and show index.js with parameters

I want when I call this URL /, my application calls the servlet to get parameter, and after the servlet sends parameters to index.jsp. This is my web.xml: CRUDServlet