After hours of fussing with VideoServlet, I came to the conclusion that the method with the list stuff in it was never actually being called. So I commented out the add stuff, and voila, the link from the index page now retreives the list
jsp. However, the code still isn't working. I'm having trouble coming up with a way to tell the app which action I want it to perform. It seems to do the one that appears first, even if I put it inside an if block. It seems to me the logic should work, but it doesn't. I tried doing a private class like default for each action, but the compiler complained because there are some abstract classes I would have to implement in order to do that, and I have a feeling that this is the wrong trail. The
doc for ActionServlet states:
/**
* Override init and call this method for every action to be implemented.
*
* @param actionKey The text that will be sent in the
servlet parameter to kick off this action.
*/
I want to put all of the code inside the inner class Default that deals with adding or listing and where to forward, etc, and then have init add the actionHandler, just like was done in reverse and bee servlets. Is this the right approach, or am I missing something because there are two actions to be dealt with here?