| Author |
How to generate custom user URL ?
|
Hatem Alimam
Ranch Hand
Joined: Dec 14, 2008
Posts: 30
|
|
Hi everybody ...
I wonder how can I generate a custom user URL in java ?
I mean when a user registers in my website I want to generate a custom profile page url example : http//mydomain/username >>>>this url takes the user to his profile page
regards ))
|
SCJP 5.0, SCWCD 1.4, SCBCD 3.0 with 100 score
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56224
|
|
It's pretty easy with URL mapping if your URL can have a few more parts, For example:
http://www.something.com/contextpath/profile/username
The contextpath is necessary for identifying the application (but can be omitted if the app is the root application), and profile can be a servlet mapping that invokes a servlet that will look up the user's profile and forward to a JSp for displaying it.
Within the servlet, the username part of the URL can be retrieved using the path info methods on the request.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: How to generate custom user URL ?
|
|
|