+
+ /*
+ * Add X-Powered-By header for JSP, if Catalina already added a
+ * corresponding header for servlets
+ */
+ if (response.containsHeader("X-Powered-By")) {
+ response.addHeader("X-Powered-By", "JSP/2.0");
+ }
+


This is a pretty bad implementation IMO.
What's the use of disabling this feature ?

The spec declares these headers as optional, which means Tomcat should make them configurable. Some sites may prefer not to include this information in their responses, for security reasons or whatever.


-1 on the various flags and checks (just add the headers, without flags and complexity). -0 if you can indicate a good reason for this.
Also, you shouldn't add the JSP 2.0 header in JspServlet. If you precompile, it's not called. Put it in HttpJspBase.

I had thought about adding the JSP 2.0 header in HttpJspBase, but then realized that the "extends" page directive allows you to specify the class that the generated servlet should extend, in which case HttpJspBase will be out of the picture. Do you have a better idea?



Jan




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to