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
1 answer

Can Liberty support two authentication methods within same server?

For example I need that my Web app will support two different auth methods, for GUI it will be OpenID, already configured and worked. For API it will be Http Basic Authentication based (I guess) on . How do I need to configure web.xml…
Anatoly
  • 5,056
  • 9
  • 62
  • 136
0
votes
1 answer

How to configure Liberty's basicRegistry with LDAP?

Can Liberty perform Http Basic Authentication while taking user/password pairs from Ldap registry? Supposing that I have worked ldapRegistry how do I bind it to basicRegistry (if I understand correctly it what I need to do) that basicRegistry will…
Anatoly
  • 5,056
  • 9
  • 62
  • 136
0
votes
2 answers

H2 db file in custom location

I am starting H2 db in embedded mode. By default h2 db file is getting created in users directory. I have requirement of creating in a custom location. The custom location should be read from environment variable ( Example %MY_HOME%= C:\TEST). The…
user2329702
  • 479
  • 1
  • 4
  • 12
0
votes
0 answers

Issues configuring web.xml mapping

I have just picked up web development and I cannot for the life of me figure out what I'm doing wrong when mapping the SimpleServlet in web.xml these are my files: My web.xml is:
vega2015
  • 119
  • 3
  • 11
0
votes
1 answer

Java Servlets set urlPattern from database

I have been practicing java Servlets. Can I set urlPattern from database? @WebServlet(name = "PatternServlet", urlPatterns = "/pattern") The following servlet creates html pages getting information from postgres, so content is dynamic. However url…
valijon
  • 1,304
  • 2
  • 20
  • 35
0
votes
1 answer

WARN: No mapping found for HTTP request with URI [/SpringMVCHibernate/] in DispatcherServlet with name 'appServlet'

Hello guys i'm getting this below error after starting the server. Can anyone please help me out how to handle this error ? I'm using ECLIPSE Luna and spring 4.0.3. Is there anything with the particular spring version for eclipse LUNA i need to…
Batman
  • 103
  • 3
  • 12
0
votes
1 answer

Serve static files from Java webapp subdirectory

I have a Java webapp (RESTEasy) organized as follows: src/main |- java/ |- webapp/ |- WEB-INF/ |- web.xml |- public/ |- The public folder gets filled with static files (index.html, compiled js, css…
fwind
  • 1,274
  • 4
  • 15
  • 32
0
votes
2 answers

where is the XSD and semantics of the web.xml defined?

I am trying to find where the XSD and the semantics for the deployment descriptor web.xm file is defined in the Servlet 3.0 specification. Alternatively, where is an authoritative description of the various supported elements and attributes that…
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331
0
votes
1 answer

Servlet Mapping issue when called from two different folders

File 1: public_html/eval.jsp File 2: public_html/m/eval.jsp File 1 form action: action="submitEval" File 2 form action: action="../submitEval web.xml: submitEval
Mr Man
  • 1,498
  • 10
  • 33
  • 54
0
votes
0 answers

Cannot get REST response (with Postman). Java, IntelliJ, Tomcat 9, Maven

I'm only a beginner. I have this project that I was working on a training course. It was set up on Eclipse and it was working. I'm now trying to get this same code working using IntelliJ Ultimate and I cannot any rest response. I'm probably doing…
Rain
  • 63
  • 1
  • 10
0
votes
1 answer

Navigation case not working in JSF

We're working on our first JSF project, and we have some problems. We are making the login functionality, and when we hit the login button, it throws: an IllegalArgumentException - null source a NullPointerException - Servlet.service() for servlet…
DaJackal
  • 2,085
  • 4
  • 32
  • 48
0
votes
1 answer

Filter & RequestDispatcher to change URL effect on existing filters

I have made a filter that is responsible for adding .do to requests and is the first declared filter: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if(!…
Menelaos
  • 23,508
  • 18
  • 90
  • 155
0
votes
1 answer

can someone explain using servlets and setting it up in web.xml

I'm only a beginner but I have gone through one beginners Java training course where we also covered some aspects of REST so I'm starting to understand things a little bit better. I would really like to understand more about servlets and how…
Rain
  • 63
  • 1
  • 10
0
votes
1 answer

Servlet mapping issue with websphere

Following is my servlet mapping: Path: EAR/WAR/WEB-INF/web.xml GetChartDetails com.high.GetChartDetails
Akshaya
  • 61
  • 5
0
votes
0 answers

All URLs return 404 from Tomcat

I can start up my app via a main method using an embedded Grizzly container, and all my Jersey resources respond as I expect. But when I drop my war in the webapps directory ($CATALINA_HOME/webapps/ROOT.war), I get 404s for everything. What might be…
Travis Well
  • 947
  • 10
  • 32