make it works for servlet