You can get the request object in your action method by:
HttpServletRequest request = ServletActionContext.getRequest();
You can then find the request URL like this:
String spath = request.getServletPath();
Then you can parse it and look for the pattern that you want and forward accordingly.
UPDATE:
You can use a package in the struts.xml configuration file. Lets say "userapps".
<package name="userapps" extends="default" namespace="/userapps">
<action name="*" class="path.to.your.ActionClass" method="processUrl">
<result name="success" type="redirectAction">
<param name="actionName">userpage</param>
<param name="id">${user.id}</param>
</result>
</action>
</package>
In the ActionClass's processURL method you can pull out the part of the URL that you are interested in and set a property lets say the user and his id. You then return success from your action.
You will have a second action called userpage say, that will take the user's id and forward to the correct page.
Now, any url of the form localhost/myapp/userapps/anything.action will call the processURL method.