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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:52:09+00:00 2026-06-09T17:52:09+00:00

I have a file variables.properties in my GWT application inside the war folder .

  • 0

I have a file variables.properties in my GWT application inside the war folder. The file contains a jdbc string, username and password, hence I would not like to see it on the client side in any way.

My question: Is variables.properties somehow integrated into client side code at runtime when placed inside the war folder or is it safe to place it there?

If it is not, where should I put it?
I read the file with this code:

variables = new Properties();
BufferedInputStream stream = new BufferedInputStream(new FileInputStream("variables.properties"));
variables.load(stream);
stream.close();

Thanks in advance!

  • 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-09T17:52:10+00:00Added an answer on June 9, 2026 at 5:52 pm

    If you don’t want the properties to be visible to the GWT client code (or to a web browser poking around) you can load them from your classpath. That way they’ll end up in WEB-INF/classes which is not visible. If you’re using Maven you can store your properties files in src/main/resources. Otherwise you can store them next to your Java source files and make sure they get copied during your build process. You can load them from the classpath by using: http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String)

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

Sidebar

Related Questions

I have two string variables which are both file paths. The code that worked
I have a general XML file containing different properties for my Play! application like:
My war file has 3 properties files: test.properties, dev.properties and prod.properties. My application context
I have a Spring application-context.xml with PropertyPlaceholderConfigurer to get properties' values from .properties file.
I have a file containing substituted variables ( #{...} ) and I would like
I have a .h file where 2 variables are declared, then I have a
I have a file that defines constant variables, like this: define_vars.php <? define(something,value); define(something1,value);
I have a php file which has some variables like $name1, $name2... How can
I have a settings.php file with parametric variables and a functions.php with well, some
So I have a php file that retrieves some variables with the $_GET method

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.