tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46958] New: manager XML interface hard-coded path in XSL transformation
Date Thu, 02 Apr 2009 23:55:38 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46958

           Summary: manager XML interface hard-coded path in XSL
                    transformation
           Product: Tomcat 6
           Version: 6.0.18
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Manager application
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: photodeus@gmail.com


The manager XML-interface cannot be used if it's installed under any other path
than /manager, failing to find the xform.xsl file needed for XSL
transformation.

Fails:
http://example.com/mymanager/status?XML=true

Works:
http://example.com/manager/status?XML=true

Reason for error, in Tomcat sources
org.apache.catalina.manager.Constants
XML_STYLE returns the constant value 
"<?xml-stylesheet type=\"text/xsl\" href=\"/manager/xform.xsl\" ?>";

The /manager part needs to be modified to match webapp path.

Caller:
org.apache.catalina.util.RequestUtil.StatusTransformer
public static void writeHeader(PrintWriter writer, final String contextPath,
int mode) {
  //...
  // TODO needs current virtual webapp path as parameter
  writer.write(Constants.XML_STYLE);

}

On a sidenote, in org.apache.catalina.manager.host.Constants there is a similar
hard-coded value, which might cause similar problems in the future. It seems to
be unreferenced in the current sources right now (unused value).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message