The context.xml file is a web application context descriptor used by the Apache Tomcat servlet container.
Questions tagged [context.xml]
199 questions
0
votes
0 answers
AbstractMethodError inTomcat 8
I am getting this error.
Stacktrace:] with root cause
INFO | jvm 1 | 2019/06/06 08:49:59 | java.lang.AbstractMethodError
INFO | jvm 1 | 2019/06/06 08:49:59 | at…

Shelly
- 410
- 7
- 26
0
votes
0 answers
MATA-INFcontext.xml is getting override by tomcat/conf/contex.xml
I have a maven based application that contains META-INF/context.xml which contains the database info. I am deploying my app in tomcat-9.1 tomcat has its own conf/context.xml, tomcat context.ml file has some other database info
When i deploy my app…

Varun
- 4,342
- 19
- 84
- 119
0
votes
1 answer
How to properly connect to XAMPP mySQL DB using context.xml
I'm setting up a connection with XAMPP MySQL DB using context.xml. Where do I shall put my schema (database) name, username, password? I'm trying to this like this:

Luke_Nuke
- 461
- 2
- 6
- 23
0
votes
1 answer
#define STRING equivalent in Tomcat Java App
I have a tomcat app that needs to write to a file in a particular directory that is different depending on where the application is deployed (windows host v linux host, etc..).
The class object that needs to know the file location is an Exception…

H. Green
- 735
- 5
- 10
0
votes
0 answers
How to use context.xml in embbed tomcat with gradle please?
My environment:
Gradle 4.8
openjdk version "1.8.0_181"
My dirs like :
/src/main/webapp/META-INF/context.xml
And in context.xml, I put a db resource:

xunitc
- 207
- 1
- 2
- 10
0
votes
1 answer
Method to retrieve resources from context.xml in Tomcat
I wanted to retrieve values from my context.xml, and I've found this snippet of code to do so:
// Acquire an instance of our specified bean class
MyBean bean = new MyBean();
// Customize the bean properties from our attributes
Reference ref…

somethingsomething
- 11
- 8
0
votes
1 answer
is it possible to run previously deployed /webapp/myapp if docBase myapp.war file is not available?
i placed war file on shared drive. And i set docBase in my tomcat ...\conf\Catalina\localhost\myapp.xml like this:
When shared drive is up then tomcat (AutoDeployOnStartup=true) checks war and deploy it successfully. But when shared drive is down…

trix0gen
- 11
- 2
0
votes
1 answer
Tomcat 8.5 context path not working correctly
I have an application with the name cat_tiger.war that gets deployed as localhost:8080/cat_tiger but I want to change the context path to localhost:8080/cat/lion/ instead. I've added the META-INF/context.xml file as

GrizzLee
- 3
- 1
- 1
- 4
0
votes
2 answers
Cannot create JDBC driver of class '' for connect URL 'null all the time
Hello I have following problem:
Whenever I try to connect to MySQL DB I get this error:
com.pbs.web.jdbc.ParkingBookSystem.BookControllerServlet doGet
SEVERE: null
**java.sql.SQLException: Cannot create JDBC driver of class '' for connect URL…

Luke_Nuke
- 461
- 2
- 6
- 23
0
votes
1 answer
Tomcat is unable to read my context.xml file
I have the following issue:
I have context.xml file which can not be read by the server either by adding through @Resource() injection or by using class (check below). I'm using eclipse, Tomcat 9.0. I have .war file exported by eclipse and put in…

Luke_Nuke
- 461
- 2
- 6
- 23
0
votes
1 answer
docker-compose environment variables to tomcat context.xml
I have the following problem: I want to define, in my docker-compose file, some environments variable for my db connection.
services:
myapp:
build: SessionHandler
container_name: sessionhandler
environment:
-…

d_vucin91
- 119
- 2
- 12
0
votes
1 answer
spring i18n not working
Hello I'm trying to do a i18n in: Spring-MVC-Maven configured-by-context.xml project
I have files (path:\src\main\resources):
messages.properties
messages_pl.properties
The app used to work properly when there is only one file -> reads
<…

ehr
- 143
- 1
- 1
- 12
0
votes
1 answer
Issue with deploying spring boot war file on tomcat?
I have a Spring boot application that works correctly.
I created a war file (MyApp.war) following the instructions available from spring guide.
I have installed Tomcat 8.5.24 on Ubuntu desktop and it is running successfully.
If I delete the out of…

Ganesh
- 44
- 1
- 6
0
votes
0 answers
Deploying application to tomcat
I'm trying to deploy a war file in the webapps folder of tomcat 9. But I want my application to be loaded at the startup, not the tomcat default page. So I configured docBase in the Context tag in server.xml to point to my application like…

Uttam Singapura
- 87
- 1
- 7
0
votes
0 answers
Moving config props from META-INF/context.xml out of web app
I am working with an ancient legacy web app which I need to prepare for continuous integration by separating resource configuration from the app itself (so that we can make a single WAR file that works on every environment assuming config file…

amphibient
- 29,770
- 54
- 146
- 240