From the left flank

My Errors Index on Google App Engine with Spring

leave a comment »

Google App Engine

I can’t store my class insantiations to session.

For example,

request.getSession().setAttribute("myObject",new MyObject());

Very basic, did you set the sessions-enabled to true in the appengine-web.xml?

<sessions-enabled>true</sessions-enabled>

Not so obvious, did you implement that object as serializable? Check your logs if you get the NotSerializableException.

publc class MyObject implements Serializable {
       //code
}

When using Spring Forms I get the java.security.AccessControlException: access denied
error

Override the initBinder method

@Override
protected void initBinder(HttpServletRequest request,
	ServletRequestDataBinder binder) throws Exception {
binder.registerCustomEditor
          (String.class, new StringTrimmerEditor(false));
}

More to come…

Written by Jose Asuncion

October 4, 2009 at 5:00 pm

Posted in Google AppEngine

Tagged with

Leave a Reply