So here are 2 requests:
- http://example.com/someUrl/
- http://example.com/someUrl/index.xhtml (xhtml extension is not relevant just an example)
When the <welcome-file>index.xhtml</welcome-file>
is been set, request 1 is handled by the server as 2.
However, in both cases the request.getRequestURI()
returns the complete URI: someUrl/index.xhtml
.
According to documentation it shouldn't but in most cases it's what we want so it seems fine it does.
I'm working with JSF under JBoss Wildfly (Undertow webservice) and I don't know which one is responsible.
I don't necessarily want to change how it works but I'm looking for a way of getting the original URI as the enduser sees in browser address bar, thus without the index.xhtml
part in case of 1.
To be more precise, I have to get the exact same URL as returned by document.location.href
in JavaScript.