Replace query servlet with query resource to make adding new resources easier