Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9204069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:37:09+00:00 2026-06-17T23:37:09+00:00

I would like to specify context for db in xml file. <Context path=/db3 docBase=C:/my/workspace/db3/>

  • 0

I would like to specify context for db in xml file.

  <Context path="/db3" docBase="C:/my/workspace/db3/">

 <Resource name="jdbc/ksidb" auth="Container" 
        type="javax.sql.DataSource"
        description="Books" 
        driverClassName="com.mysql.jdbc.Driver"
        url="jdbc:mysql://localhost:3306/ksidb"
        username="root"
        password="root"
        maxActive="20" /> 
</Context>

I’ve read that I should copy that file to /webapps tomcat catalogoue. I did this but tomcat7 doesn’t read the file. Do you know why? What to do? Thx.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:37:10+00:00Added an answer on June 17, 2026 at 11:37 pm

    What you read is wrong. I’d question other advice from that source if it told you something so completely false. Per the Tomcat docs, your options for placing the context configuration are as follows:

    • In an individual file at /META-INF/context.xml inside the application files. Optionally (based on the Host’s copyXML attribute) this may be copied to $CATALINA_BASE/conf/[enginename]/[hostname]/ and renamed to application’s base file name plus a “.xml” extension.
    • In individual files (with a “.xml” extension) in the $CATALINA_BASE/conf/[enginename]/[hostname]/ directory. The context path and version will be derived from the base name of the file (the file name less the .xml extension). This file will always take precedence over any context.xml file packaged in the web application’s META-INF directory.
    • Inside a Host element in the main conf/server.xml.

    I highly recommend you visit the linked docs to learn more about the correct way to configure Tomcat.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to specify JNDI name for an EJB3 bean using annotation, but
What I would like to do is create a configuration/properties/xml file in an Eclipse
I would like to specify that I want FEATURE_INDETERMINATE_PROGRESS for my Activity . It
I would like to specify the order of initialization of portlets when the portal
I'm using NUnit mocks and would like to specify that I expect a call
Hi GPUImage community and Brad, I would like to specify the filter size (radius)
Is it possible to specify a condition in Count() ? I would like to
Would like to parse IPv4 address from exit-addresses . Format of the file: ExitNode
I would like to validate a custom XML document against a schema. This document
I've got an XML file which is something like : <doc> <element> <word> <text>one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.