Frans Thamura wrote:

http://www.jroller.com/fthamura -> my login fthamura


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.





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to