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

Accidentally changed packaging to 'war'. How to revert to 'jar' properly?

I have created a Maven project with the facets: Java, JPA and Utility Module. In the pom.xml I set packaging to jar. Everything worked fine. Later I accidentally set the packaging to war and Eclipse started to complain that "web.xml is missing and…
Dooobi
  • 75
  • 1
  • 8
0
votes
1 answer

How to handle web.xml authorization to local js/css files when returning '403 Forbidden'?

I have a website which only people with authorization can enter. If someone does not have authorization, my web.xml redirects them to a 403 error page. However, both my application and my error pages use some external js and css files (e.g.…
Daniël Camps
  • 1,737
  • 1
  • 22
  • 33
0
votes
1 answer

Java EE web.xml: How to exclude a single page from a

I want on all pages BUT ONE (header.jsp) to include-coda like in this code: *.jsp footer.jsp I just don't get how I can limit the Pattern to exclude header.jsp
Hedge
  • 16,142
  • 42
  • 141
  • 246
0
votes
1 answer

Bean value not being filled in on JSP page

I am new to Java... I made this application, but the problem is that when I run the project I am getting the text which i have written in h tag's value attribute instead of the value from the bean. I have searched a lot but the problem is still…
Raja
  • 11
  • 1
0
votes
0 answers

Redirection from filter is not working

I'm trying to redirect my app to the login page in case the session has expired (I have set an interval of 60 minutes). I have created a filter but it seems the redirection is not working properly. My web.xml:
Celia
  • 345
  • 1
  • 8
0
votes
1 answer

Is there a way to limit a servlet accessibilty to a certain port?

I have an application which is using two different ports, 443 & 4443. Another is for using the application (UI) and the other is a control channel for some automated clients. I have few different servlets configured in web.xml. First is for the UI…
Jokkeri
  • 1,001
  • 1
  • 13
  • 35
0
votes
0 answers

Application Security Not loading resources

I am developing a Java Web app. I have just added a filter in order to make sure that users have logged in. I added in my web.xml file: security-filter
user2955610
  • 815
  • 2
  • 9
  • 15
0
votes
2 answers

How to implement complicated servlet mapping in web.xml descriptor

I faced with next task: I have an host, for example host.com and web-application on it. Application written on Java (JSP/Servlets+Struts2). I need to implement such HTTP-request to servlet mapping: if user enters address in browser like…
vmg
  • 9,920
  • 13
  • 61
  • 90
0
votes
1 answer

how to properly map a servlet in java ee web.xml

Basically I am trying to map a servlet to my web.xml but it's not working. Here is how i am doing it: Project directory: C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\ROOT FYI: I have removed all apache default webapp files…
Denmaq
  • 1
  • 2
0
votes
0 answers

the module has not been deployed,

kindly gimme insight into whats going on in here, I have a deployment descriptor web.xml where url patterns are mapped to the servlet such as this ControllerServlet
Jawad
  • 313
  • 4
  • 16
0
votes
1 answer

JSP Login Authentication Script failing (MySQL-backend) web.xml servlet mapping?

I am just starting out with JSP in NetBeans 6.9.1 and im trying to make a basic login script for user authentication (sessions will be added later; These are made automatically for every JSP page right?) The problem I am having is the following. I…
Rhizosis
  • 29
  • 2
  • 9
0
votes
1 answer

Web.xml ignored

I have an application running on tomcat on a ubuntu server. The problem is that apparently the web.xml file is being ignored. The URL I want to run is throwing a 404 error. I have the following configuration in my…
0
votes
1 answer

Can't get war file deployment using glassfish

This is the war file contents: tar -xvf search.war x META-INF/ x META-INF/MANIFEST.MF x WEB-INF/ x WEB-INF/classes/ x WEB-INF/classes/com/ x WEB-INF/classes/com/init/ x WEB-INF/classes/com/init/HelloServlet.class x WEB-INF/web.xml web.xml…
sudeepdino008
  • 3,194
  • 5
  • 39
  • 73
0
votes
1 answer

No Initial Context Exception in j2ee

I am trying to do the connection pooling with context.xml and web.xml. context.xml
Hemal
  • 26
  • 1
0
votes
0 answers

IntelliJ ultimate doesn't find web application support in existing project

Hi I've got IntelliJ IDEA Ultimate 2016.2.2 and can't add Web app development support to existing project... I tried the suggestion on the IJ doc site, but in the Add framework support windows there's nothing like Web application, as you can see in…
Piotr Bartoch
  • 407
  • 1
  • 5
  • 18
1 2 3
99
100