Server-side code (in Java) for frame+ application