Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamically add new pages to website

 
Abhay Talreja
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I wanted to implement a feature on my application, that when a user creates his own page on my site, i add his username to the url - identifying his own personal page.

The best example would be www.facebook.com/username/

We can select our own name and whenever we have the url with that name we directly land up on our page. May be there is a way to update it via xml? from the db?

I tried to google it but couldnt find a suggestion on how to approach and implement it on my site (JSP's)

Thanks!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would be easy to map a servlet that accepts any random string, that you interpret as the username, as a path parameter.

Then it's just a matter of looking up the user-specific info in the DB and forwarding to a dynamic JSP that displays the user-specific data.
 
Abhay Talreja
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:It would be easy to map a servlet that accepts any random string, that you interpret as the username, as a path parameter.

Then it's just a matter of looking up the user-specific info in the DB and forwarding to a dynamic JSP that displays the user-specific data.


Thanks a lot, i'll try it and let you know the results. But, i think your solution makes sense to me.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to read up on what a CMS is and does.
 
Abhay Talreja
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:You might want to read up on what a CMS is and does.


Well, i am already working on it, i am planning to utlize spring (3.x) mvc framework, use hibernate. tomcat, include cms (yes i did read about it, and the read is on) from some other free source... (after a lot of study and my comfort-ability i have worked this out) you got any suggestion, to design a scale-able, maintainable website for personal use only ? - i could have gone for php but i have a java background and i know the power java has...

Also, on the topic, i asked a couple of friends and URL shortening was another option recommended.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
URL shortening was another option recommended.

What do you mean by that? What's commonly understood by that phrase is a service like goo.gl or bitly.com; surely that's not what you intend to implement?
 
Abhay Talreja
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:
URL shortening was another option recommended.

What do you mean by that? What's commonly understood by that phrase is a service like goo.gl or bitly.com; surely that's not what you intend to implement?


You are right, i also read the same. But, my friend was saying that what i am looking for can also be achieved by url shortening.

So, far i have not come across any example on url shortening that meets my requirements.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's because, as Ulf pointed out, it has nothing at all to so with this issue.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic