When you're using Tiles with Struts and do...
request.getRequestURL()
...you get the URL to e.g. /WEB-INF/jsp/layout/newLayout.jsp
instead of the real URL that was entered/clicked by the user, something like /context/action.do
.
In newer Struts versions, 1.3.x and after, you can use the solution mentioned on javaranch and get the real URL using the request attribute ORIGINAL_URI_KEY
.
But how to do this in Struts 1.2.x?