Created
March 15, 2010 18:45
-
-
Save headius/333169 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import javax.servlet.http.* # this doesn't work yet... | |
import com.google.apphosting.api.ApiProxy; | |
import com.google.apphosting.api.ApiProxy.Environment; | |
class Plain < HttpServlet | |
def doGet(req:HttpServletRequest, resp:HttpServletResponse); throws IOException | |
env = ApiProxy.getCurrentEnvironment | |
app_id = env.getAppId | |
raw_ver = env.getVersionId | |
version = raw_ver.substring 0, raw_ver.lastIndexOf(".") | |
domain = env.getAuthDomain | |
# print out some stuff | |
resp.setContentType "text/plain" | |
resp.getWriter.println "app_id: #{app_id}\nversion: #{version}\ndomain: #{domain}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment