Properties file location in web project




















Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search. This project later should be deployed on few servers to which I don't have an access. So in my opinion there is no way to customize org. I have already tried to put these files:.

So where I should locate this file? It's a legacy project just Eclipse Project without Maven and it's structure is pretty ugly. I have created this directory, but where finally this file should be after deployment a WAR archive to Tomcat? So let's say you have a module which is deployed into war in any of the 2 forms: as a jar, or exploded as classes.

When using maven, maven resources directory is converted as eclipse sources directory by m2eclipse plugin. Maybe this will help. I think that documentation is fairly up-to-date, but you can find details of how it is implemented in the loadConfiguration method of DefaultSecurityConfiguration.

Just a minor update that may be relevant. Looks like the 2. How are we doing? Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No. Any additional feedback? Note This topic applies to Visual Studio on Windows. Properties location. How are we doing? Please help us improve Stack Overflow.

Take our short survey. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Confused about java properties file location Ask Question. Asked 9 years, 11 months ago. Active 5 years, 6 months ago. Viewed 45k times. I have simple java project with structure: package com.

Improve this question. Add a comment. With the help of properties file, we will be eliminating these hard coded value one by one. Each parameter in properties file is stored as a pair of strings, in key-value pair format, where each key is on one line.

You can easily read properties from some file using an object of type Properties. This is a utility provided by Java itself. If any information is changed from the properties file, you don't need to recompile the java class. In other words, the advantage of using properties file is we can configure things that are prone to change over a period of time without need of changing anything in code.

For E. We keep application Url in the property file, so in case you want to run test from on other test environment, just change the Url in a property file and that's it. You do not require to build the whole project again.



0コメント

  • 1000 / 1000