> > >> > There's several ways to do this in struts 2. The best approach depends on > what else your application does. > > Option 1. Low effort > Implement a custom ActionMapper. It'll contain the logic to detect that > the URI references a user and select the appropriate action with the > username as a param. > > Option 2: Higher effort, but generic > a. Use Struts 2.1 > b. enable the NamedVariablePatternMatcher (instead of with > WildcardPatternMatcher) > c. Implement a custom ActionMapper that supports IndexActions. (or an > action to invoke when no action is named) > d. Create an IndexAction with namespace "/{username}". It'll be invoked > with the username as a param. >
is the roller the best practices one? any implementation for my reference F