Hey Partha,
A good question, but perhaps one that would best be asked on StackOverflow. This forum is meant for general discussion of the platform, not specific-issue technical support. Regardless, I'm happy to help with the beginnings of an answer:
1) You can detect whether you're in production or development programmatically using
com.google.appengine.api.utils.SystemProperty.
2) You can also use maven's own feature of "
Build Profiles" to have the system automagically insert the correct values for the correct environment through maven, rather than programmatically at servlet init, as suggested in 1).
I hope these resources are helpful to you!
Sincerely,
Nick
Cloud Platform Community Support