Bug 47324

Summary: sessionsList.jsp uses absolute urls which doesn't work for Tomcat behind a reverse proxy
Product: Tomcat 6 Reporter: Maik Jablonski <maik.jablonski>
Component: Manager applicationAssignee: Tomcat Developers Mailing List <dev>
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: default   
Hardware: All   
OS: All   

Description Maik Jablonski 2009-06-06 10:09:35 UTC
sessionsList.jsp uses getRequestURL() which creates absolute links (with server:port included) like:


This is a problem when running Tomcat-Manager-Application behind a reverse proxy (e.g. apache http server), because outgoing links doesn't work anymore.

Proposed fix is to use getRequestURI instead.

<    String submitUrl = ((HttpServletRequest)pageContext.getRequest()).getRequestURL().append("?path=").append(path).toString();
>    String submitUrl = ((HttpServletRequest)pageContext.getRequest()).getRequestURI() + "?path=" + path;
Comment 1 Mark Thomas 2009-09-27 10:45:57 UTC
Many thanks for the patch. It has been applied to trunk and proposed for 6.0.x.
Comment 2 Mark Thomas 2009-10-03 14:09:25 UTC
This has been fixed in 6.0.x and will be in 6.0.21 onwards.

Thanks again for the patch.