So I\'m trying to grab the current URL of the page using Java\'s request object. I\'ve been using request.getRequestURI() to preform this, but I noticed that when a java cla
Same answer as @kdgregory, but you can rather use the Request Dispatcher constants.
javax.servlet.include.request_uri RequestDispatcher.FORWARD_REQUEST_URI
javax.servlet.include.context_path RequestDispatcher.FORWARD_CONTEXT_PATH
javax.servlet.include.servlet_path RequestDispatcher.FORWARD_SERVLET_PATH
javax.servlet.include.path_info RequestDispatcher.FORWARD_PATH_INFO
javax.servlet.include.query_string RequestDispatcher.FORWARD_QUERY_STRING