Hi,
I've created a servlet for serving up Ajax request. This servlet will be a toolbox for users to easily extract XML for use in Ajax calls.
It will have a quite few methods for returning XML e.g. getContacts, getLatestNews etc. However, to call the correct method I have to do this:
if (userReq.equalsIgnoreCase("getLatestNews"));
getLatestNews(request, response);
if (userReq.equalsIgnoreCase("getContacts"));
getContacts(request, response);
I want a general purpose servlet rather than loads of them for each type of request.
I want to do something like:
callmethod(String);
Is there a way of doing this? I am using Java 1.5.
Thanks
Mark