fixed bug in form handling
use getRealPath() to find the main xpl file
reorganising samples