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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:36:18+00:00 2026-05-17T00:36:18+00:00

I have to access a config file which is in a directory on the

  • 0

I have to access a config file which is in a directory on the app server file system, but it is not deployed as part of my Java EE app.

Would getResourceAsStream() help me in this case?

  • 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-17T00:36:18+00:00Added an answer on May 17, 2026 at 12:36 am

    Would getResourceAsStream() help me in this case?

    Not unless the config file is on the classpath, no. You’re going to have use java.io to do what you need, unless you can convince the appserver to fetch it for you by some non-standard means.

    This will take you outside of the JavaEE realm, and runs the risk of falling afoul of the appserver’s security model.

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

Sidebar

Related Questions

In a servlet I have a config text file. How to prevent web access
I have access to an Oracle server that has some databases that I would
I have this txt file which is ls -R of etc directory in a
I have an app which stores some data in .php files in /library/ directory,
Say I have a config file in which I have paths to JSON properties.
I have a singleton class for global access to config information. This singleton class
I have Access table with fields, in which there is some data and path
Assume I have access to a SMB server at IP 1.2.3.4, how can I
I would like to have access to the Seconds_Behind_Master field, (as returned by SHOW
I have this code to load a config file and read all the values

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.