This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
App startup duties are generally handled by servlets or a plugin; is there any particular reason it needs to be an action?
Dave Alvarado
Ranch Hand
Joined: Jul 02, 2008
Posts: 434
posted
0
Just code-reuse. I wanted to call an action -- /<ctx>/refresh.do an arbitrary points during my app's life cycle, but I also wanted to invoke the same functionality immediately upon application startup. I could also create a servlet and start it up in web.xml, but then I have two code bases that essentially do the same thing, so I was wondering if there was a way to merge the two.
Whatever the action's logic is should be encapsulated in business logic anyway, no? If it's not web-related it doesn't belong in an action, IMO, although the web tier can *call* it.