View | Details | Raw Unified | Return to bug 46958
Collapse All | Expand All

(-)java/org/apache/catalina/manager/StatusManagerServlet.java (-1 / +1 lines)
Lines 197-203 Link Here
197
            completeStatus = true;
197
            completeStatus = true;
198
        }
198
        }
199
        // use StatusTransformer to output status
199
        // use StatusTransformer to output status
200
        StatusTransformer.writeHeader(writer,mode);
200
        StatusTransformer.writeHeader(writer,mode, request.getContextPath());
201
201
202
        // Body Header Section
202
        // Body Header Section
203
        Object[] args = new Object[2];
203
        Object[] args = new Object[2];
(-)java/org/apache/catalina/manager/StatusTransformer.java (-2 / +7 lines)
Lines 70-87 Link Here
70
     * @exception IOException if an input/output error occurs
70
     * @exception IOException if an input/output error occurs
71
     * @exception ServletException if a servlet-specified error occurs
71
     * @exception ServletException if a servlet-specified error occurs
72
     */
72
     */
73
    public static void writeHeader(PrintWriter writer, int mode) {
73
    public static void writeHeader(PrintWriter writer, int mode, String contextRoot) {
74
        if (mode == 0){
74
        if (mode == 0){
75
            // HTML Header Section
75
            // HTML Header Section
76
            writer.print(Constants.HTML_HEADER_SECTION);
76
            writer.print(Constants.HTML_HEADER_SECTION);
77
        } else if (mode == 1){
77
        } else if (mode == 1){
78
            writer.write(Constants.XML_DECLARATION);
78
            writer.write(Constants.XML_DECLARATION);
79
            writer.write
79
            writer.write
80
                (Constants.XML_STYLE);
80
                (getXmlStyle(contextRoot));
81
            writer.write("<status>");
81
            writer.write("<status>");
82
        }
82
        }
83
    }
83
    }
84
84
85
	public static String getXmlStyle(String contextRoot) {
86
		return "<?xml-stylesheet type=\"text/xsl\" href=\"" 
87
				+ contextRoot 
88
				+ "/xform.xsl\" ?>";
89
	}
85
90
86
    /**
91
    /**
87
     * Write the header body. XML output doesn't bother
92
     * Write the header body. XML output doesn't bother

Return to bug 46958