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

  • SEARCH
  • Home
  • 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 6960089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:21:26+00:00 2026-05-27T15:21:26+00:00

I am migrating a project to a servlet. I put the jars in the

  • 0

I am migrating a project to a servlet.
I put the jars in the lib directory, the compiled classes in classes directory.
However, I have some files (properties, a wsdl file) that I am loading and reading in my application. For example this is how I am loading my properties:

try {
    InputStream in = new BufferedInputStream(new FileInputStream("my.prop"));
    myConfig.load(in);
} catch (Exception e) {
    logger.error(e.getMessage(), e);
}

Where do those files that I am loading go?

  • 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-05-27T15:21:27+00:00Added an answer on May 27, 2026 at 3:21 pm

    They usually go straight in the classpath so that you aren’t dependent on the current working directory of the local disk file system. But you’ve got to change the way how you’re getting an inputstream:

    InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("my.prop");
    

    See also:

    • Where to place and how to read configuration resource files in servlet based application?
    • getResourceAsStream() vs FileInputStream
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am migrating some of configurations in my project to Spring beans. I am
I'm migrating a piece of functionality from my App_Code directory to a separate project
I am migrating a project from NHibernate 1.2 to Nhibernate 2.1, and I have
I'm in the process of migrating my JDBC project to Hibernate. I have a
I have a old VB6 project.Now I migrating it in VB.Net on vs2008 and
We are gradually migrating a Spark based project to use Razor and I have
I have a project that I am in the process of migrating to using
I have a problem migrating from Delphi 2006 to Delphi 2009. A Project which
I have a brand new Rails 3.1rc4 project. After generating a scaffold, migrating and
I have these two file in my project that I am migrating from php.

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.