2007/8/5, Chris Pratt <[EMAIL PROTECTED]>:
> I'm trying to create a tile that generates a menu where the menu items
> are sensitive to the page they're on, but for some reason I can't seem
> to figure out how to find the current page. When I try:
>
> <!--
> req.getPathInfo() = ${pageContext.request.pathInfo}
> req.getPathTranslated() = ${pageContext.request.pathTranslated}
> req.getRequestURI() = ${pageContext.request.requestURI}
> req.getRequestURL() = ${pageContext.request.requestURL}
> req.getServletPath() = ${pageContext.request.servletPath}
> -->
>
> it generates:
>
> <!--
> req.getPathInfo() =
> req.getPathTranslated() =
> req.getRequestURI() = /layout/default-layout.jsp
> req.getRequestURL() =
> http://anodyzed.planetpratt.com/layout/default-layout.jsp
> req.getServletPath() = /layout/default-layout.jsp
> -->
>
> which tells me what layout I'm using, but not what the actual request
> was. Is there any way to get access to the page name?
I suppose the answer is "no", at least directly.
Your problem will be the same even if you don't use Tiles, because,
when you forward to a JSP page, the latest request URI will be that
JSP page.
But the question is: do you want to create a customized menu depending
on the definition name?
In this case, I think you should look the concept of "preparer":
http://tiles.apache.org/tutorial/advanced/preparer.html
Ciao
Antonio