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

Audio seek / skip ahead in Chrome

In Chrome I can't seek / skip ahead in an audio track when played from my localhost. I can skip head when the src mp3 is on a remote server. Both play and seek in FireFox and IE. I'm using Java Spring MVC with Apache Tomcat 7. From other posts I…
Conor
  • 85
  • 1
  • 10
0
votes
1 answer

Download Excel as xlsx instead of zip format in Scalatra

I'm writing the Excel Workbook created using Apache POI to the response object directly as follows without creating a file: val outputStream: ByteArrayOutputStream = new…
Putt
  • 299
  • 4
  • 10
0
votes
0 answers

Using multiple servlets in one dynamic web project (eclipse)

I am trying to use multiple servlets in one dynamic web project. The web.xml code is as follows:
0
votes
0 answers

RequestDispatcher forward to jsp being caught by servlet url pattern

I have a jsp located in the /package directory. Then I map my servlet with a WebServlet Annotation of "/package/*". In my servlet, I forward the request to a jsp in the above directory: RequestDispatcher dispatcher = …
theyuv
  • 1,556
  • 4
  • 26
  • 55
0
votes
0 answers

Patterns in jersey provider packages value

I know that we can provide multiple packages in the providers separated via semi-colon. ... jersey.config.server.provider.packages
user145078
  • 241
  • 2
  • 3
  • 8
0
votes
1 answer

How welcome page works when using JDBC Realm?

When setting up JDBC Realm we specify the form-login-page which loads at first for authentication. If it occurs first, how the welcome file specified in web.xml loads? Will JDBC Realm redirect to welcome file when login is success?
Sidath Asiri
  • 359
  • 4
  • 18
0
votes
1 answer

SEVERE Error in deploying WAR in Tomcat .ContainerBase addChildInternal error

I am not able to deploy my application war file in Tomcat Server version 7.0.54. Here is the error log. WEB.XML branding default
Skadoosh95
  • 27
  • 1
  • 6
0
votes
0 answers

Configure context path of tomcat application

I'm trying to change the context path of a tomcat application. I've read this question and have tried to add a root.xml file as described in the accepted answer: Add root.xml file in $CATALINA_BASE/conf/[enginename]/[hostname]/ and add this as…
Aviran Katz
  • 741
  • 2
  • 8
  • 26
0
votes
0 answers

Creating a basic API

Hi I am trying to learn to create a API I am following this tutorial, but when I run simple GET API to display hello I am not able to start the tomcat server and getting the following error SEVERE: A child container failed during…
Legendary_Hunter
  • 1,040
  • 2
  • 10
  • 29
0
votes
2 answers

Servlet not working

i wrote a basic java servlet code which is not working. Iam using oracle12c release 2 and apache tomcat 9.0. The below doesnot show any error but after clicking submit in html pae it loads into an empty page MY html file is
Thakur Karthik
  • 3,034
  • 3
  • 15
  • 24
0
votes
1 answer

Web.xml issue cannot find declaration

This is the start of my web.xml in which the errors occur
0
votes
0 answers

How to handle servlet exceptions in Rest Web Services Java using error-pages in web.xml?

I want to handle Servlet Exceptions in my rest web services.I am using error-pages tag in web.xml file but still am not able to catch the exceptions.Where should I place my ErrorHandler.java file.Below is my web.xml file
0
votes
1 answer

does multiple packages should have corresponding groupid and artifactid in POM configuration

I am building restful application for selecting data from mysql using maven. I am quite confuse with POM configuration which looks like below:
Shrestha Sunil
  • 329
  • 4
  • 13
  • 28
0
votes
1 answer

Where is the welcome page set in a Maven webapp archetype project

I created a Maven project with webapp archetype. There is just an index.jsp file in /src/main/webapp folder. The web.xml file doesn't mention any welcome file. No other mention or any setting elsewhere. On running the application, the index.jsp page…
Naman
  • 2,363
  • 5
  • 26
  • 27
0
votes
1 answer

HTTP Status 404 error in Rest WS concept

I am just Rest API concept with hello world program. I'm following some tutorial videos and trying the same program But I'm not getting the expected result. Here is my Book.java package com.book; import javax.ws.rs.GET; import…
Shambhu
  • 121
  • 3
  • 11