Questions tagged [properties-file]

A .properties file is either a simple text file or an XML file containing pairs of keys and values. Java and related technologies frequently use .properties files to store configuration information.

Properties files can also be used to store Strings for Internationalization and Localization and error messages.

and related technologies frequently use properties files.

Further Reading:

1316 questions
0
votes
1 answer

How to use a properties file that contains numbers properties in shell

This is my first question on StackOverflow. I am pretty sure it would have been answered already (it is a pretty dumb question, I think, as I just started to learn Linux scripting), but I did'nt succeed to find an answer yet. Sorry for that. Here is…
Lazuli
  • 37
  • 4
0
votes
3 answers

What is the preferred way to read and write to a .properties file from within a Tapestry application

What is the preferred way to read and write to a .properties file from within a Tapestry application? I have a Tapestry web application and at some point, I need to read (and write only once) some properties from a .properties file. The application…
ioreskovic
  • 5,531
  • 5
  • 39
  • 70
0
votes
0 answers

Intellij IDEA dont find properties files

I prefer using IntelliJ IDEA but my company uses NetBeans, in it project works just fine, but when I start to fire it up on IDEA I am getting that it can't find **.properties files Structure is something like that: project-src/all modules…
IowA
  • 966
  • 1
  • 11
  • 25
0
votes
1 answer

Spring property is null in dependent maven project

I have one main maven project(MyProject) and one dependent maven project(MyDepProject). I want to access the Spring property from properties file(myProps.properties) as define below in MyProject's config xml file as below
0
votes
1 answer

Cannot read properties file with web app (Maven web app with JSF)

I have a properties file: hibernate.properties inside default package. I am trying to read it from a class inside another package: com.somepackage.SomeClass. In a normal desktop application, the following input stream is working: InputStream is =…
coolscitist
  • 3,317
  • 8
  • 42
  • 59
0
votes
1 answer

Spring PropertyPlaceholderConfigurer and keys with multiple values

I've a properties file like this : firstproperty=1,2,3,4 secondproperty=47,998,120 thirdproperty=54 My properties file is well defined in my Spring configuration as property for my PropertyPlaceHolderConfigurer bean. I want to load values in a…
0
votes
1 answer

What is the proper location of properties files for a java web service?

This question isn't in regards to how to get/read the properties files, but instead what is the standard or accepted location to keep them. Specifically, I've got two types of properties, one that is sort of a server config file and a couple that…
Aaron
  • 896
  • 3
  • 11
  • 22
0
votes
0 answers

load properties file from class path

I created a "AppProp.java" file to write 3 properties(dabase hostname,dbuser name,dbpassword) in "config.properties".I tried load properties file from classpath.but it gives error as following .... **Exception in thread "main"…
0
votes
1 answer

add properties file to jar

I have a properties file config.properties that I am accessing in a java project in Eclipse. BufferedReader bfr = new BufferedReader(new FileReader(new File("config.properties"))); This works fine when I run the project in Eclipse. But when I…
user840930
  • 5,214
  • 21
  • 65
  • 94
0
votes
1 answer

Java utility unable to find and read its properties file

I have to execute a java utility (UTL.jar) through a shell script (mainUTL.sh). It utilizes a properties file (SetupUTL.properties). The location of the files is as following - /a/b/mainUTL.sh /a/b/UTL.jar /a/b/SetupUTL.properties I…
0
votes
1 answer

Using external .properties in Thymeleaf template

In summary, I need to find a way to use value from .properties files in a Thymeleaf template. In details now, I want to have Google Analytics on my page. There are development and production application build profiles. Each of these profiles has its…
Ilya Saunkin
  • 18,934
  • 9
  • 36
  • 50
0
votes
2 answers

Unable to read value from properties file in java

Actually i'm trying to get the values from JSP page and writing those data to config.properties file. I'm able to write the data in it. But i can't able to read the property values from that config.properties file. public static void startup()…
Prasanna
  • 468
  • 3
  • 11
  • 26
0
votes
1 answer

How should I invoke a packaged spring project from another spring project?

I have two spring projects both using maven. The first is a client for some api and the second is a console program that, in part, utilises that client. I have packaged up the client into a jar and referenced it in the pom for the console program. I…
Rupert Madden-Abbott
  • 12,899
  • 14
  • 59
  • 74
0
votes
1 answer

How to achieve modular Ant builds?

I would like to have a "modular" (reusable) Ant build that I can reuse across multiple projects. The build might be able to take a project (directory) name as input and run the same common targets on various projects' source code. This is to prevent…
user1768830
0
votes
3 answers

Is it normal to store large pieces of HTML-code in properties file?

I need to store a quietly big piece of HTML-code as a static resource. Is it normal to put it into properties file? Or would it be better if it stored in separate HTML-file? Storing in properties file seems to be more convenient since Spring has…
Anton
  • 235
  • 1
  • 4
  • 9