Create a short url for a doctor profile

I created a site using JSF 2.0 and MySQL.

I have one page where I show the doctor’s profile:

http://www.example.com/faces/doctorProfile.xhtml?profileName=drrajesh

What my client asks is one of the following:

http://www.example.com/drrajesh
http://www.example.com/faces/drrajesh

They want it to be like Facebook / instagram.

Any idea how this can be done in JSF?

Note. I want this only for this particular page, and not for the entire website.

Even if I get the url as shown below, everything is ok with me.

htttp://wwww.mywebsite.com/doctorprofile/drrajesh

Change 1

During the research I found below, the link

http://ocpsoft.org/prettyfaces/

but I'm not sure how to use it in my case.

This is useful for statically changing the URL, but in my case it is different. My url is dynamic.

0

Source: https://habr.com/ru/post/1568482/


All Articles