I have a Servlet with doGet method. It takes param type and based on the type I have different responses.
Can someone suggest the annotation I should use in doGet
switch (type) {
case A:
jsonString = A.class Json
break;
case B:
jsonString = B.class Json
and so on..
There are approx 20-25 types
I would also appreciate if someone points me to the web.xml and pom.xml to generate the api for a simple servlet like this.