This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Display JSP on custom URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Display JSP on custom URL" Watch "Display JSP on custom URL" New topic

Display JSP on custom URL

Glen Iris
Ranch Hand

Joined: Jul 13, 2011
Posts: 164


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 ( 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?



Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60810

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.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Glen Iris
Ranch Hand

Joined: Jul 13, 2011
Posts: 164

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.

I agree. Here's the link:
subject: Display JSP on custom URL
Similar Threads
Caching Proxy Server Advice
how to display default page after jsp authentication
Customization for non logged in user - Weblogic portal
Dynamically add new pages to website
How to index the JSP page for different pages