tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet JspServlet.java
Date Mon, 21 Jul 2003 19:16:05 GMT
luehe@apache.org wrote:

> luehe       2003/07/21 12:06:35
> 
>   Modified:    jasper2/src/share/org/apache/jasper/servlet JspServlet.java
>   Log:
>   Added support for X-Powered-By response header, as defined by the
>   Servlet 2.4 and JSP 2.0 specs.
>   
>   The Servlet 2.4 spec defines a special
>   
>     X-Powered-By: Servlet/2.4
>   
>   header, which containers may add to servlet-generated responses. This
>   is complemented by the JSP 2.0 spec, which defines a
>   
>     X-Powered-By: JSP/2.0
>   
>   header to be added (on an optional basis) to responses utilizing JSP
>   technology.
>   
>   The goal of these headers is to aid in gathering statistical data
>   about the use of Servlet and JSP technology


>   +
>   +	    /*
>   +	     * 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 ?

-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.

Remy



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


Mime
View raw message