• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Display JSP on custom URL

 
Ranch Hand
Posts: 176
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am developing (design stage) a web application. I would like to display each page in the app on its own custom URL. For example, Facebook allows users to have their own sub-url (facebook.com/users-custom-url). I would like my application to do the same but mine will be automated, my page URL's will be auto generated depending on the page content and this URL will be stored in a database.

Any suggestions that you have which would allow me to achieve this would be appreciated, for example, is this something the Spring framework offers?

Thanks,

G
 
Sheriff
Posts: 67746
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
Use a Front Controller that gets called for all "custom" URLs (though not for images, scripts and other resources). This is easier if there is a specific prefix used for all "custom" pages.

The Front Controller can look up the association with the actual page for the "custom" suffix, and forward to that location. The URL in the browser will remain unchanged.

Could also be done with a filter.
 
Glen Iris
Ranch Hand
Posts: 176
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Marshal! I will use that as a starting point for my research. If anybody else has suggestions / ideas, I'd love to hear them too.

G
 
reply
    Bookmark Topic Watch Topic
  • New Topic