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 8276519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:24:08+00:00 2026-06-08T08:24:08+00:00

In my project a servlet has to connect to database (derby) .I build my

  • 0

In my project a servlet has to connect to database (derby).I build my project into .war file.

Now before deploying the project in Tomcat , how do i tell the server the URL of the databsae,JNDI name,driverName etc etc. How do i do this ? I was told to add these into the context.xml file. Do i have to create this file myself ? Otherwise there is also a context.xml file in the conf directory of tomcat. I have to deploy one more project that also needs to connect to the database but has a different URL. So i think i can’t add the details in the context.xml file in conf directory.

How do i deploy these two projects ? Do i need to make 2 different context.xml files ?

  • 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-08T08:24:09+00:00Added an answer on June 8, 2026 at 8:24 am

    Put the configuration in a context.xml and put that file in the META-INF folder of your war. See tomcat context documentation on the tomcat website.

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

Sidebar

Related Questions

I have a web project that has a \META-INF\services\javax.servlet.ServletContainerInitializer file with its content pointing
I have checked out a java servlet project from subversion that has a strange
I have a simple GWT project in Eclipse, it has a servlet that calls
I'm not overly familiar with Tomcat, but my team has inherited a complex project
My current project has me accessing a database quite frequently. To do so, I
I have a JSP file which I am deploying within a Java Project with
I am working on my project of quiet sometime now I am using tomcat
I have a java application 'JA' and a Java project containing a servlet project
I created one GWT webapplication project.Inthat i want to create servlet program,but in that
in the tomcat6 server I have a project that contains a servlet, I called

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.