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
2 answers

Servlet Filter Order When Filters are Registered Programmatically

I have several Servlet filters which need to execute in order - one after the other. I don't want to declare them in the web.xml file, nor do I want to use the @WebFilter annotation. Instead, I use the ServletContext.addFilter() method. The…
0
votes
2 answers

Post Form won't call Servlet

So i have a post form which calls a Servlet to perform a search but the problem is that when i push the submit button it's completely unresponsive. Although when used in the same form in a different .jsp page it works as it should. If it had…
CharisAlex
  • 93
  • 12
0
votes
1 answer

Servlet works on Eclipse but not on Tomcat server "The requested resource is not available."

I created a servlet that worked on Eclipse but gives me "The requested resource is not available." When accessed on my tomcat server at http://cs3.calstatela.edu:8080/cs3220stu48/Labs/RequestSummary yet works when on…
STRAN
  • 73
  • 1
  • 8
0
votes
1 answer

I don't want to refer server side jars for my project, My primefaces+spring project has to use the jars that i added to lib folder

I'm working on Primefaces + Spring project.Recently we migrated the project from JSF 1.2 to 2.2 Version.Previously our project was using jsf Implementation and API jars from Project's lib folder but now it's using the jars located…
0
votes
0 answers

Which web.xml to use?

Which web.xml should I use? web.xml in the project folder or web.xml in servers folder? Which should I use? Can I use both?
southouse
  • 57
  • 3
  • 8
0
votes
0 answers

How to deploy web application to the specific glassfish virtual server?

Is there a way to specify a virtual server in the web application deployment descriptor, like web.xml or glassfish-web.xml? In the application deployment guide i found the information: Virtual Servers. If you deploy a web application and do not…
kojot
  • 1,634
  • 2
  • 16
  • 32
0
votes
1 answer

My all XML configuration files of SpringMVC project show some error that they can't recognize the symbol in the files

I don't know how those error occured,the project goes no any problem just now. I remember I renamed the index.jsp and create a new RestController. The error say "Element param-serviceName is not allowed here". Here are some images show the…
widiot
  • 3
  • 2
0
votes
0 answers

below listener configuration not working in web.xml for spring application

The below ContextListener is my self-defined class and below is the code for it and the medthods defined in are not getting called .i;m not sure what internally is happening.please help me on this package com.apalya.promo.properties; import…
Ramesh Raj
  • 185
  • 1
  • 2
  • 13
0
votes
0 answers

How to change context root path from http://host:port/app_name to only an app_name in Dynamic Web Project?

How can I change context root path from http://host:port/app_name to only an app_name in web.xml file or another way in Dynamic Web Project. Actually, I'm facing an issue to import local javascript, css and other resources into my view say…
Aditya
  • 1,214
  • 7
  • 19
  • 29
0
votes
1 answer

How use a Java EE Filter with included pages?

I'm a little bit newbie using Java EE Filters and I have a doubt about them. I want to create a Filter that do some stuff when every web page of my site (JSP) are loaded. For example, if I want to visit index.jsp, the Filter is loaded first and then…
Ommadawn
  • 2,450
  • 3
  • 24
  • 48
0
votes
2 answers

HTTP status 404 in eclipse Spring MVC 4 +Hibernate with MySQL + Tiles.xml

I already searching about my error but I got nothing. still error in my code so i have to post my question here. I got an error when I run my project in eclipse with tomcat server. I already finish the project in Spring MVC 4 + Hibernate with…
Harsh
  • 243
  • 3
  • 20
0
votes
1 answer

tomcat 6 configuration problem?

hello if uploaded my war file to webapps and restarted tomcat it deployed my file but its not reachable from "outside" is there sth wrong with the config: cat ./TEST/WEB-INF/web.xml
0
votes
1 answer

Jboss starts servlets in wrong order

I am working with Jboss JBoss EAP 6.4.5.GA (AS 7.5.5.Final-redhat-3) and I have a problem with web.xml. Here is the part of web.xml that I have: Servlet1
Kacu
  • 438
  • 4
  • 23
0
votes
3 answers

Confusion related to contextConfigLocation in web.xml

I created a simple Hello World Spring MVC project. I added the below lines in my web.xml contextConfigLocation /WEB-INF/spring-servlet.xml My code is working…
Joginder Pawan
  • 659
  • 3
  • 10
  • 19
0
votes
1 answer

How to enable webapp as distributable in grails 3+

How do i enable webapp to be distributable in grails 3+ since there is no web.xml?