Making short url for doctor profile

2019-09-03 20:37发布

问题:

I have made website using JSF 2.0 and MySQL.

I have one page where I am showing doctor profile:

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

What my client is asking is one of the following:

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

They want it like Facebook/instagram.

Any idea how this can be done in JSF?

Note: I want this for this specific page only and not for whole website.

Even if I get url as below is fine with me.

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

Edit 1

While research I found below link

http://ocpsoft.org/prettyfaces/

but I am not sure how can I use in my case.

This is useful for static url change, but in my case it is different. My url is dynamic.