Skip to main content

Posts

Showing posts with the label google-app-engine

App Engine - Intermittent 500 errors on /_ah/openid_verify

I'm getting intermittent errors when logging into my app with the Google openid. The link they are sent to is http://www.example.com/_ah/login_redir?claimid=www.google.com/accounts/o8/id&continue=http://www.example.com/login2?returl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8 . Then when they grant access to my app, sometimes there is a 500 error on the url: http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%

Respond encoding of Google App Engine(can not change response encoding)

public class FeedUpdaterServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { PrintWriter out = resp.getWriter(); req.setCharacterEncoding("utf-8"); resp.setLocale(Locale.TAIWAN); resp.setContentType("text/html; charset=utf-8"); resp.setCharacterEncoding("utf-8"); resp.getWriter().println("Hello, world!!@!"); out.println("我是人"); //some chinese character out.println(resp.getCharacterEncoding()); out.flush(); out.close(); } } web xml <locale-encoding-mapping-list> <locale-encoding-mapping> <locale>zh_TW</locale> <encoding>utf-8</encoding> </locale-encoding-mapping> </locale-encoding-mapping-list> Output: Hello, world!!@! ??? ISO-8859-1 It seems that the encoding of the respond can not be changed, what is happening???

Guice3 Singleton is never instantiated in GAE project

I'm new to Guice and already stuck :) I pretty much copied classes GuiceConfig, OfyFactory and slightly modified Ofy from Motomapia project (which you can browse) using it as s sample. I created GuiceServletContextListener which looks like this public class GuiceConfig extends GuiceServletContextListener { static class CourierServletModule extends ServletModule { @Override protected void configureServlets() { filter("/*").through(AsyncCacheFilter.class); } } public static class CourierModule extends AbstractModule { @Override protected void configure() { // External things that don't have Guice annotations bind(AsyncCacheFilter.class).in(Singleton.class); } @Provides @RequestScoped Ofy provideOfy(OfyFactory fact) { return fact.begin(); } } @Override public void contextInitialized

AppEngine Connected Android Project: sendNoRetry: Unauthorized - need token

i have created a new 'AppEngine Connected Android Project' with the Wizzard and entered my registred Mail-Adress. I changed nothing on the Registration-Code, that is created automatically, but I get the following Error erverytime I try to send a Message: com.google.android.c2dm.server.C2DMessaging sendNoRetry: Unauthorized - need token I tried to create a new dataMessagingToken.txt (create a new Project, with the same Name and replace it in the original one) but that does not work... I hope you can help me. Thank You Tobi