onsdag den 1. august 2012

GWT with External Server inside Eclipse

This guide functions both with and without GWT RPC as interface. The tutorial makes it possible to run the GWT frontend and backend on a server instance within eclipse. You can start the server in debug mode to debug back-end and

Requirements

  • Tomcat Binary Instance
  • Eclipse with Web Tools
  • GWT Binary loaded in Eclipse

Guide

  • Create a GWT project either command line or in eclipse
  • Create a Eclipse Dynamic web project
  • Copy 'war' folder content in GWT project to 'WebContent' folder in Dynamic Web project
  • Select properties for Dynamic Web project and unfold 'Google' select 'Web Toolkit' and check 'Use Google Web Toolkit'
  • Set 'Default output folder' ind 'Java Build Path' also in properties, to \/WebContent/WEB-INF/classes
  • Create a Server instance through 'File' menu select 'New' and Other, Now on the list you find 'Servers' and click it. Now you get a list where you select an Apache Tomcat instance
  • Now you should be able to delete the created GWT project

How To Use

  • Start Server instance with Dynamic Web project loaded as module
  • Start 'Web Application' select Dynamic Web project and right click on mouse and select Run Configurations and uncheck 'Run on built in server" and input URL like http://localhost:8080//.html
  • If you starte the previous to tasks in debug mode then you a capable of debugging both back-end and front-end.

søndag den 30. januar 2011

Why does my Android Service sleep when the phone is inactive.

Dear Reader,

During my development of an Android app for reporting periodic wifi scans, I encountered that the android service responsible for reporting the wifi-scans halted when the phone went inactive.

I searched Google and found this newsgroup thread, which gave me the answer to my problem.
Greate newsgroups answer
It also suggests how to use the AlarmManager to make a service periodically to do work.

Kind Regards Dan L. Christensen