I want get current page name of visulforce page. I have tried this and it works for the page having no query parameters in the URL but it fails in the pages having one or more parameters. Any workaround will be much helpful. Here is my snippet.
String pageName = ApexPages.currentPage().getUrl().split('apex/');
Thanks in advance!