I thought of re-framing this question once again, to make it clear. Thanks a lot the comments. I am developing a web application in which I am making use of widgets.
Take a real use case scenario, suppose USER-A logins into the my web app and he uses some widgets say A,B and C widgets. He places Widget A in the center, WIDGET-B on to the top right hand side and WIDGET-C on to the left hand side of the page.
USER_B logins into my system and uses the some widgets and places the widgets in different positions since widgets are made draggable and resizable. When the user publishes the page the widget should appear exactly in the same position exactly in the same position where he/she placed.
We are using Jquery HTML5 at the front end and servlet and my sql at the back end.
Forget about users, just consider retrieving any dynamic content. You've got some arbitrary URL
http://mysite.com/some/path/or/other
or possibly with some parameters
http://mysite.com/some/path/or/other?thing=somevalue
When the browser hits that URL some code of your will run, and you have access to the URL. Depending upon the tools you are using you may even have the parts of the URL broken out for you into some useful variables, if not you can extract the bits you care about.
String interestingBit; // somehow gets set to "other"
String thing; // somehow gets set "somevalue"
Now you can write some code to go fetch data from a file or a database,
databaseRetrieve( interstingBit, thing);
once again nice frameworks may make all this really easy. Then it's just a matter of presenting the data. So dealing with user-specific content can follow this approach. You've got to deal with other issues such as deciding how to structure the repository of content and managing the security, but as I understand your question you were asking about the interpretion of the URL.
Editedin response to clarified question:
Seems like you're developing "personalisation" function that is often provided by "Portal" products and frameworks. The key point is that you have a per-user set of preferences, which control what content is displayed and where it is displayed. There are many such products, I work for IBM so I know about WebSphere Portal and Lotus Mashups, to name but two.
So to implement this you need: