I send following http request:
http://localhost:8081/member/createCompany/getSmallThumbnail/
On server side I hit into controller method:
Your request got redispatched to /error (presumably for error processing).
If this framework follows the normal Servlet error dispatching behavior, then your original request can be found in the HttpServletRequest.getAttributes() under the various javax.servlet.RequestDispatcher.ERROR_* keys.
ERROR_EXCEPTION - The exception objectERROR_EXCEPTION_TYPE - The type of exception objectERROR_MESSAGE - the exception messageERROR_REQUEST_URI - the original request uri that caused the error dispatchERROR_SERVLET_NAME - the name of the servlet that caused the errorERROR_STATUS_CODE - the response status code determined for this error dispatchWhat you want is
String originalUri = (String) request.getAttribute(
RequestDispatcher.ERROR_REQUEST_URI)