Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

How to get the real request uri when using sitemesh3 #40

Closed
vincentchen opened this Issue Jan 15, 2013 · 1 comment

Comments

Projects
None yet
3 participants

When using sitemesh3 to decorate page,the request uri always return the layout page uri.Not the real/original uri.I need the original uri for some purpose,so how to get the real request uri when using sitemesh3

wacaine commented Jan 22, 2013

You get the same issue if you use includes. See this: http://stackoverflow.com/questions/1256562/java-httpservletrequest-get-url-in-browsers-url-bar

You have these request attributes available to you as default by the Servlet 2.4 specification

 javax.servlet.include.request_uri
 javax.servlet.include.context_path
 javax.servlet.include.servlet_path
 javax.servlet.include.path_info
 javax.servlet.include.query_string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment