Context.xml file is missing Tomcat 8

I am starting to create a dynamic web project in Eclipse. I need a file context.xml

to configure the database scope, but it is not under META-INF

, I found it instead in the Tomcat conf directory. I have configured Eclipse / Tomcat incorrectly as all sources say the file should be in META-INF

? How do I add a file context.xml

to my project?

I am using Eclipse mars and Tomcat 8.

Edit I read the post linked in the comments, they are not duplicates. To be honest, I can't even understand what the other person is asking, although this may be due to the fact that all this terminology has become new to me.

+3


source to share


1 answer


Although Eclipse is a great tool, I recommend you do networking with NetBeans.

In Eclipse, you can't find the file context.xml

where it should be under meta-inf

to find the file you can check:

First check the workspace path in Eclipse

, suppose it points to /root/workspace

.

Then after exploring the folder you should have a folder named Servers

, unless you just try to find it by looking at the server tab in Eclipse.

In the Servers folder you will find something like Tomcat v8.0 Server at localhost-config

, find the folder and the tomcat related config files will be found there.



This is because Eclipse follows its workspace layout for web applications, and NetBeans follows what Tomcat says.

And remember that creating, editing, or deleting configuration files for tomcat while running Eclipse will not affect anything, since the specified files will be used.


Server products will be found as objects similar to a project named server

, you can find it in the package manager where you explore the project tree, materials, ...
+1


source







All Articles