This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
In the 2nd example code of BeeServlet we have in method init():
I do not quite understand what the first parameter ("default") is doing exactly. In the API I read:
actionKey - The text that will be sent in the servlet parameter to kick off this action.
I think that init() starts class Default which then runs it's doAction() method. But what could class Default then do with param "default"? Or would servletData be able to do something with it? And if yes, what??
The parameter is "action", so something like http://<myurl>/BeeServlet?action=default is what you need. There's nothing significant about "default" though. The framework just assumes the first action handler added is the default one, and uses that one if it can't find an "action" parameter in the request.