hello dudes,
kindly help me...


A new Facebook account is created...
once the user creates his profile then automatically custom URL is generated for him...

(ie)niranjan kumar facebook searched in google, here v can get by clicking the 2nd link as shown in the URL http://www.facebook.com/niranvk

now we can view niranjan kumar's profile...

same as now i create a profile in my own website http://localhost/projectname/profilename... now without logging in i want 2 look my public profile followed by the URL as http://localhost/projectname/anooprm.

how can i achieve this??/

Is this link generated dynamically???

Thanks in advance

8 Years
Discussion Span
Last Post by ~s.o.s~

The simplest way here would be to create a servlet ProfileServlet which handles the task of profile creation/viewing. Map this servlet to the path /profile/* . A GET request to this path would invoke the doGet() method of this servlet which would read the username from the URL, fetch the details for the given user, store it in the request scope and and forward to a relevant view i.e. the page which should be displayed to the user. A POST request to this URL would create a profile for the same user. For an in-depth overview of these things, look up on "servlet mapping", "fileter" and "servlet rewrite".

This task should be pretty easy if you are using a framework like Struts 2.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.