I was able to get this working with this framework. However, it is to difficult to manage an xml file entry for every user. I would like my users to be able to select a username for their profile and instantly have the url www.mybuyersagent.com/larry .......work. Is there a way i can do this via this framework?
To answer your question upfront, Yes and No.
Yes, because you can modify the urlrewrite.xml file dynamically in your application. This would force the filter to reload the config (if confReloadCheckInterval is set to > 0). Once it does so, the new rules will take effect.
No, because there are multiple issues with the approach mentioned above -
- Your filter config file might grow crazy if you are not talking about a limited number of users. The filter might become a performance bottleneck for every request as it has to process those many rules for rewriting.
- You have to make sure that the changes you have done in your web-application's urlrewrite.xml file (by dynamically adding users) don't get overwritten when you deploy your web app for the next time.
Bottomline, such use cases are better handled by application logic. You can use database as the persistence layer instead of the filter's config file. A custom filter to handle such stuff is probably an answer.
Cheers
Avlesh