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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:54:28+00:00 2026-06-04T04:54:28+00:00

I am writing a Google App Engine (Java) application that reads data from a

  • 0

I am writing a Google App Engine (Java) application that reads data from a number of REST services, using OAuth for authentication. In order to support OAuth callbacks in my Development and Online environments, I have created 2 separate OAuth keys for the REST services – 1 that does a callback to 127.0.0.1 (development server) and 1 that does a callback to my real GAE website URL. This all works fine and happy.

Currently, to support this, I basically have a number of these statements throughout my code, anywhere that needs different values for Dev vs Online…

String devServer = request.getServerName();
if (devServer != null && devServer .equals("127.0.0.1")){
    oauthKey = "<my_dev_key>";
}
else {
    oauthKey = "<my_online_key>";
}

I was wondering whether GAE has any ability to auto-substitute different values for Development vs Online. I was thinking something like a ‘settings’ file that specifies 2 different values for a single setting, such that when the app is uploaded to GAE it replaces all setting references with the Online values. I would prefer that the values are substituted at upload-time rather than having a file sitting on the server with my Development settings in it, for security purposes.

Are there any alternatives that would be able to achieve a similar result without too much manual work every time I wish to upload a new version to GAE?

  • 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-04T04:54:29+00:00Added an answer on June 4, 2026 at 4:54 am

    I would store the credential in different Properties files using something like Maven and its Profile feature to build an artifact for any specific environment.

    Have a look to this project for the Google App Engine Maven plugin.

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

Sidebar

Related Questions

I am developing a Java application using Google App Engine that depends on a
All! I'm writing an application that would run on Google App Engine. I'm using
I'm writing application which consists of server side on Google App Engine (Java) and
I am looking at writing a Java web application on Google App Engine. I
I'm writing code that runs on Google App Engine (Java). What I'm trying to
I'm writing a Google App Engine application using the WebApp framework. I'd like the
I tried writing an app that samples the microphone using code from http://code.google.com/p/ios-coreaudio-example/ (Core
I'm writing a Java servlet in Eclipse (to be hosted on Google App Engine)
i am writing a web proxy in java on google App engine.I figured out
Are there any guidelines to writing Google App Engine Python code that would work

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.