Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Dynamically add new pages to website

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's because, as Ulf pointed out, it has nothing at all to so with this issue.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic