splitted runScript into getDataFromServer and runScript in servlet