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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:45:19+00:00 2026-05-27T04:45:19+00:00

I created a Play! app and deployed it under TomCat. This works well. The

  • 0

I created a Play! app and deployed it under TomCat. This works well. The only problem is the management of a properties file, currently in the conf folder right next to application.conf. But as soons as the client replaces the war file the custom properties are overwritten with the default values, resulting in errors.

Now I want to introduce a seperate properties file placed inside the webapps folder. This way I will be sure my clients will not overwrite the file ‘accidentally’.

So the structure would be:

TomCat webapps:
    myPlayApp
    PlayConfig <-- here I want to place the config file

So I would like to retrieve the properties file by something like:

getFile("../PlayConfig/app.properties");

This obvious does not work, but I do not know how to achieve this?
I thought retrieving it by tomcat http url but the portnumber my vary, so this would also not work, I guess…

UPDATE 2012-01-25:

Actually when using the following code:

Play.applicationPath.getPath();

I get the absolute path when running the project outside tomcat (so not inside war file!)

When I deploy the same project in a TomCat server I get the following output:

W:\tomcat-5.5\webapps\MyTestProject\WEB-INF\application.

From this point on I can indeed use a relative path.

  • 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-27T04:45:19+00:00Added an answer on May 27, 2026 at 4:45 am

    I think that when deployed in a Servlet container, play uses the /WEB-INF/application as base directory.
    Try changing the path relative to this folder.

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

Sidebar

Related Questions

I have created one songs album app. In this app, i have to play
I've created a Play 1.2.3 app and I'm trying to deploy its war file
I created an alias like this alias play=/Users/bobdylan/Documents/play/play After creating a new app and
I'm using the Play Framework (1.2.4) I created a UserAccount object, deployed it to
I have created an app capable of live streaming, but I currently have no
I've created an app that uses MediaPlayer to play a random (short) sound when
I use play 1.2.1 to generate my war app. I use tomcat 6 in
I'm using Play to write a webapp which is deployed in Tomcat. Because the
Trying to create my first iPhone app that would play back audio. When I
I basically created some tables to play around with: I have Two main tables,

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.