i am not sure if there is a direct method to get it, there could be one but i am not aware of it. But you can get it in the following way
Context Path :
and append the remaining url using
You might want to replace the suffix of the file name depending on your application.