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

Tomcat Basic Authentication only in specific context path

We are currently facing an issue while implementing basic authentication for a specific path inside a webapp context. Our webapps have a mapped path defined in the context.xml (example: Context path="/test_web") What we try to reach is that only the…
Tom
  • 23
  • 4
0
votes
1 answer

JSP web.xml apache tomcat

I'm new to servlets and JSP so if there is some resource or tutorial that I missed then I can check that out but here's my issue. I'm running this on a local tomcat server I've got this application i'm working on going through some tutorials and it…
IdiotDrake
  • 37
  • 9
0
votes
2 answers

Spring mvc controller doesn't work

I have simple Spring MVC project and as I see Controller doesn't work After running page http://localhost:8080/story/list shows HTTP Status 404 - But when I'm running TestDbServlet all works fine (mapped http://localhost:8080/TestDbServlet) Project…
0
votes
1 answer

JAX-RS, Spring & ServletConfig: How to access Servlet Config in Configurator

I have troubles getting a javax.servlet.ServletConfig into a class annotated with org.springframework.context.annotation.Configuration. My team decided that we should use spring for dependency injection and I'm trying to use it to migrate one of our…
Normegil
  • 157
  • 1
  • 2
  • 9
0
votes
1 answer

War file is missing Web.xml and Weblogic.xml

I have a Spring boot project which is being deployed to Weblogic. However, the WAR file that is being generated by Maven, is not including the Weblogic.xml and Web.xml and I do not know why. Can anybody tell me if there is something I am missing?…
semiColon
  • 205
  • 6
  • 24
0
votes
2 answers

Spring MVC: HTTP Status 404, No mapping found for HTTP request with URI [/BugzillaReport/] in DispatcherServlet with name 'spring-dispatcher'

I am struggling to bring up my application. But i am getting the HTTP status 404 with console warning as "WARNING: No mapping found for HTTP request with URI [/BugzillaReport/] in DispatcherServlet with name 'spring-dispatcher'" I check many people…
abyin007
  • 361
  • 2
  • 4
  • 14
0
votes
2 answers

Jax-RS url-pattern causes 404 error

I am running JBOSS 6.4 EAP in eclipse oxygen. I have a simple and working webservice that just returns is alive. When I configure the url-pattern as " /* " it is executed as expected. When I put a more substantial pattern "/rws/*" in the url-pattern…
Aaron
  • 874
  • 3
  • 17
  • 34
0
votes
2 answers

How to extend an XML File using ant xmltask by copying tags from a source-file to the dest-file in specific positions

Im trying to create a special web.xml for local development. I have some tags stored in a separate xml-file which need to be selected and pasted to specific positions inside the final web.xml. To achieve this I am using the copy and the paste action…
elfwyn
  • 568
  • 2
  • 11
  • 33
0
votes
3 answers

Shiro - redirect to login page after session timeout

I need to redirect my webapp (Java + angular) to login page when session is timed out. Does shiro do the redirection automatically or shall this be handled by code? I tried several hacks but didn't work for me. I tried adding session timeout to my…
zbeedatm
  • 601
  • 1
  • 15
  • 39
0
votes
1 answer

jdbc realm, form-login-config, Tomcat and db connection error

My tomcat 5.5 server has a classic FORM based authentication method with a JDBC-REALM. Everything works fine but I would like to differentiate the login fail (wrong userId or password) from the connection error. So I've:
mauretto
  • 3,183
  • 3
  • 27
  • 28
0
votes
0 answers
0
votes
0 answers

Restrict user to navigate to other pages without fiilling details on 1st page

I am working on a web app where user will login and after login it will be redirected to a page to fill some manadtory details.After filling those details user will be redirected to main app page and user can work normally. My problem is that if…
P G
  • 878
  • 1
  • 9
  • 15
0
votes
1 answer

Web.xml warning "File name references to main that does not exist in web content"

Question: I want to set servlet 'main' as welcome file in web.xml but it shows warning "File name references to main that does not exist in web content" Browser can't access CSS files but can access Images which both fall under same parent…
babybear
  • 804
  • 1
  • 10
  • 24
0
votes
1 answer

Setting X Frame Options on Weblogic

I need to configure X- Frame Options for my Angular.js Application which runs on Weblogic Server but I can,t seem to find an example. My preference would be to do it in web.xml file similar to this example for Tomcat : How do I set X-Frame-Options…
user1107888
  • 1,481
  • 5
  • 34
  • 55