question: protected void doGetData ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { Properties properties = null ; try { properties = buildProperties ( request . getPathInfo ( ) , KEY_DEVICE_ID , KEY_DEVICE_TYPE_ID , KEY_MESSAGE_TYPE_ID , KEY_LIMIT ) ; } catch ( IllegalArgumentException e ) { printError ( response , e . getMessage ( ) ) ; return ; } try { String tableName = properties . getProperty ( KEY_TABLE_NAME ) ; if ( ! isTableExists ( tableName ) ) { printError ( response , "A table with the name [" + tableName + "] does not exist in the data base. Please, send some messages of type '" + properties . getProperty ( KEY_MESSAGE_TYPE_ID ) + "' first on behalf of the device." ) ; return ; } } catch ( SQLException e ) { printError ( response , e . getMessage ( ) ) ; return ; } String tableData = null ; try { tableData = selectTableData ( properties ) ; } catch ( SQLException e ) { printError ( response , e . getMessage ( ) ) ; return ; } printJson ( response , tableData ) ; }
target:  Gets content of the DB table as JSON string