getDevices working in servlet