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

Logger variable of log4j is always null

This is how I declared the variable final static Logger logger = Logger.getLogger(MainController.class); my web.xml log4jConfigLocation
Ayush
  • 206
  • 7
  • 22
0
votes
0 answers

Deploying an ear with web.xml on websphere changes the web.xml or create web_merged.xml with changed attributes for multi-part

I have an ear file built which has a war file inside.The war has web.xml which has servlet defined: ExcelDownload web.ExcelDownload
Ajay Kumar .G
  • 61
  • 1
  • 6
0
votes
1 answer

logback value from web.xml

I'm trying to take a value from spring profile set in web.xml. I've already encountered a question that solves my problem but the implementation of the solution to the problem does not seem to be working. That's are my source…
Isdeniel
  • 196
  • 10
0
votes
1 answer

GWT web.xml - java ee - login and session

I'd like to know if there is a way to provide login support fora all web application content. I mean when user tries to access some site (also static content - html), and he isn't logged or session expires he should be redirected to login site. Html…
beginner
  • 1
  • 1
0
votes
1 answer

How can I configure JPA for a postgres database schema?

I have an existing postgres database with the database "testdb" and the database schema testdbschema". If I use the default persistence.xml configuration of RESOURCE_LOCAL the following property is working:
0
votes
1 answer

Tomcat Filter-Mapping not working through ProxyPass

I'm trying to lock down access to the admin section of my Tomcat WebApp by using a filter in the web.xml file. Remote Address Filter
0
votes
1 answer

Deploying Spring boot into WebLogic 10.3.6

I've developed a RESTful webservices using java 7 and spring boot 1.5.9. Have added weblogic.xml and dispatcherServlet.xml files in webcontent folder. I've generated a WAR and tried to deploy it into our weblogic server 10.3.6, while doing that i'm…
Charan
  • 143
  • 1
  • 3
  • 8
0
votes
1 answer

How to call property file when project is loaded through web.xml in Java?

I have made a property file and loading my database connection from that file only. What I am doing is using Servlet context, I am getting the resource and this code I have written in my login page (login.jsp) like this <%ServletContext…
manish thakur
  • 760
  • 9
  • 35
  • 76
0
votes
2 answers

Jboss EAP - Servlet not loaded

I have a war file containing: META-INF |___MANIFEST.MF WEB-INF |___web.xml |___classes |____servlet |____StarterServlet.class my web.xml looks like:
Francesco Rizzi
  • 631
  • 6
  • 24
0
votes
1 answer

web.xml page can't find home welcome-file

Ecplise say to me that I've an error in the web.xml page but I can't find it. This is the web.xml page
Roberto
  • 33
  • 2
  • 8
0
votes
2 answers

i am unable to see the login page on the web browser

this is the java code:i am not getting any error indication but the output of the code is not displayed on the web server.it is showing the web address as:(http://localhost:6027/HttpSearchBar/Example). Tell me whether the local host 6027 is a valid…
0
votes
0 answers

The servlet does not allow to open form-login-page

I have servlet with @WebServlet({"/*", "/secure/*"}) annotation. The second url was created for content that can be obtained by authenticated users. And the first url for all users. As a server I'm using weblogic. So this is my…
Adey
  • 1,846
  • 1
  • 10
  • 18
0
votes
0 answers

How to add some common include in thousands of jsp file?

I gotta situation where my project is up & running from many years. Now to enhance it's security I'm planning to include some code (Using a common javascript & jsp file) in every jsp file. To overcome this manual work, is there any way out where I…
Jaykishan
  • 1,409
  • 1
  • 15
  • 26
0
votes
1 answer

Convert web.xml to java config in Spring Boot

I'm currently trying to move my project from Java EE to Spring Boot project. However, I've been stuck and confused to replacing the web.xml in java config. I tried to replaced it, but it is not working. The project web.xml file contains some filters…
RSCode
  • 1,573
  • 2
  • 13
  • 21
0
votes
0 answers

how to obtain the url about one recource(file.doc)

Suppose I have a file.doc in my maven web project. I need to get the http url abount this file.doc The path is: C:\Example\Book\resources\file.doc Now I need to get the http url about this file, So I go in this…
Doflamingo19
  • 1,591
  • 4
  • 12
  • 32