When you use tiles in struts and do
request.getRequestURL()
You get url to /WEB-INF/jsp/layout/newLayout.jsp
instead of real URL that was entered/clicked by user, something like /context/action.do
.
In new struts versions, 1.3.x and after, you can use solution mentioned on javaranch and get real url using attribute ORIGINAL_URI_KEY
attribute.
But how to do this in struts 1.2.x?